// Find the last query used by this party ID for this screen section.
// select X from ui_query q, ui_screen_section ss, ui_screen s where q.section_id = ss.section_id and q.party_id = <party_id> and ss.section_name = <section_name>
// and s.screen_name = <screenName> and s.screen_id = ss.screen_id and q.queryName = <queryName>
DynamicViewEntity dve = EntityHelper.createDynamicViewEntity( delegator, "UiQuery");
dve.addMemberEntity("UiScreenSection", "UiScreenSection");
dve.addViewLink("UiQuery", "UiScreenSection", Boolean.FALSE, UtilMisc.toList(new ModelKeyMap("sectionId", "sectionId")));
dve.addMemberEntity("UiScreen", "UiScreen");
dve.addViewLink("UiScreenSection", "UiScreen",Boolean.FALSE, UtilMisc.toList(new ModelKeyMap("screenId", "screenId")));
dve.addAlias("UiScreen", "screenName", null, null, null, null, null);
dve.addAlias("UiScreenSection", "sectionName", null, null, null, null, null);
EntityCondition condition = new EntityConditionList(UtilMisc.toList(
new EntityExpr("partyId", EntityOperator.EQUALS, partyId),