04-30-2010 05:48 PM
ContactList cl = application.ActFramework.Contacts.GetContacts(null)
cl = application.ActFramework.Contacts.GetTaggedContacts(sortCriteria, cl)
05-03-2010 05:24 AM
If your looking for the current lookup, the most straightforward way might be:
ContactList cl = actApp.ApplicationState.CurrentContactList;
If the above doesn't get you what your looking for I could take a look at why GetTaggedContacts isn't returning the expected results.
As for retrieving field specific info for a contact you were on the right track with Contact.Fields, just needed to add the field you were looking for like Contact.Fields["FieldName", isReal] -- I personally have better luck with field aliases than real field names but either are acceptable.
08-18-2011 08:25 AM
Sorry to resurrect an old thread, but I have a similar issue. I have a menu option that triggers an action through the SDK that needs to be able to identify which contacts have been selected on the current Contact List screen. I use:
ContactList cList = currentFramework.CurrentLookupContactList
To obtain the Contact List object, but can't seem to find any way to identify which of those contacts have been selected (highlighted) by the user.
How can this be accomplished?
08-18-2011 11:01 AM
Is the TaggedItems property not returning the items in the list that have been tagged? I remember the previous poster having an issue with this but he didn't respond since the initial post so I assumed it was resolved.
08-18-2011 11:05 AM
It doesn't ever seem to return any results, but the Contacts aren't necessarily tagged they're just selected. I think I've got it working by using the following code:
IContactView listView = this.application.UIContactManager.GetContactListView();
foreach (Contact contact in listView.GetSelectedContacts())
do stuff here.......