Showing results for 
Search instead for 
Do you mean 

Show CompanyLookup for given IDs / CompanyList

Copper Contributor
Posts: 220
Country: Netherlands

Show CompanyLookup for given IDs / CompanyList

Hi all,


How can I make a company lookup in Act! For a given set of Company ID’s?


For contacts I can do this:


actApp.UILookupManager.LookupContacts(cl); // cl being a ContactList



For companies there isn’t a LookupContacts with a CompanyList parameter. Lookup by criteria doesn’t allow me to use the COMPANYID column:



MutableEntityFieldDescriptor desc_ID = ACTFM.Contacts.GetFieldDescriptor("TBL_COMPANY.COMPANYID", true);
CriteriaColumn col_ID = ACTFM.Lookups.GetCriteriaColumn(desc_ID);
Criteria crit_ID = new Criteria(Act.Framework.Lookups.LogicalOperator.Or, 0, 0, col_ID, OperatorEnum.EqualTo, ValueEnum.True);

How can I best achieve this? I’d rather not do a lookup with hundreds of OR’s based on Company Name…



ACT Certified Consultants
the Netherlands
Copper Elite Contributor
Posts: 90
Country: Canada

Re: Show CompanyLookup for given IDs / CompanyList

Not sure if there is a better way but i do it like this (snippet below):


                    var lstRecords = _actApp.ActFramework.Companies.GetCompaniesByID(new SortCriteria[] { }, lstRecordIDs.ToArray());

                        _actApp.ApplicationState.CurrentCompanyList = lstRecords;

                        if (lstRecords.Count > 1)
Ahsan Khalid

Chief Technology Officer
Keystroke Quality Computing Inc.