08-09-2013 01:47 PM - edited 08-09-2013 02:20 PM
I've created a CustomSubEntity (Events) with Company as the ParentEntity.
Is there someway to show CSE fields when keying Company Criteria (Advanced Query lookup)?
Even if you can't do this through the Criteria form is there a way to create the criteria XML and lookup that way?
I've tried saving a .CRY then modifying with my CSE information
<?xml version="1.0" encoding="utf-8"?> <lookups> <lookup> <criteria> <criteriaItem> <columnId>9d47b5c2-16ff-44ca-86ba-38dbce541db1</columnId> <tableName>CUST_EVENT</tableName> <columnName>CUST_EventName_023201396</columnName> <tableDisplayName>Event</tableDisplayName> <columnDisplayName>EventName</columnDisplayName> <domain>String</domain> <operator>StartsWith</operator> <leftParentheses>0</leftParentheses> <rightParentheses>0</rightParentheses> <values> <value type="string"> <dataItem><![CDATA[Test]]></dataItem> </value> </values> <logicalOperator>End</logicalOperator> </criteriaItem> </criteria> </lookup> </lookups>
When I try to load the query I get
Opportunity lookups and Products (which I assume is different than a CSE since it's native) appear to work the way I'm looking for...
Are lookups beyond the scope of CSE's? Or can this be done some other way, like using UILookupManager?
08-13-2013 07:43 AM - edited 08-13-2013 07:44 AM
I worked out a custom solution to do lookups using CustomSubEntities:
I'm using an OleDB (and Linq2SQL) query to pull the relevant COMPANYID values then I set the CurrentCompanyList.
// Get the COMPANY IDs var companyGuids = db.ExecuteQuery<Guid>("SELECT COMPANYID FROM CUST_EVENT INNER JOIN CUST_COMPANY_EVENT ON ... WHERE ..."); // Get a CompanyList using the GUIDs Act.Framework.Companies.CompanyList companyList = ActApp.ActFramework.Companies.GetCompaniesByID(null, companyGuids.ToArray()); // Set the CurrentCompanyList using the GUIDs ActApp.ApplicationState.CurrentCompanyList = companyList; // Open the Company List view ActApp.ExecuteCommand("act-ui://com.act/application/menu/view/companylist");
07-16-2014 09:58 AM
Hey this is great and exactly what I was looking for but were you able to integrate your CustomSubEntity into the Lookup Dialog Box?