Community
Showing results for 
Search instead for 
Do you mean 
Reply

Accessing secondary contacts with the SDK.

New Member
Posts: 4
Country: USA

Accessing secondary contacts with the SDK.

How do I access the Secondary Contact and the Contact overflow tables using Visual Studio?  We have a lot of user defined fields in out ACT! database that we need to extract information from.  I am working in Visual Basic and can't figure out how to get at the sub entity data.  Is there a code sample in one of the SDK packages.  I am using ACT 2012 and the corresponding Visual Studio package.  Sometimes I'm a little slow......Thanks for the help.

Employee
Posts: 1,163
Country: USA

Re: Accessing secondary contacts with the SDK.

There are a few different ways to get contact data. One would be through the SDK, most of the methods and fields are availalbe in the Act.Framework.Contacts namespace. The psuedo code to get data from a field for a particular contact would look something like this (sorry for the c# instead of vb):

 

Contact myContact = ActApp.ApplicationState.CurrentContact;

ContactList secondaryContacts = ActApp.ActFramework.Contacts.GetSecondaryContacts(null, myContact);

 

ContactFieldDescriptor myField = ActApp.ActFramework.Contacts.GetContactFieldDescriptor("TBL_CONTACT.USER3");

myField.GetValue("someValue", myContact);

 

There are some additional samples included in the SDK webhelp document under Code Samples -> Contact Samples.

 

Another alternative would be to get the data either directly from SQL or via an OLEDB connection to the database, any of these methods you'll have access to the data in the primary and spill over tables.

Matthew Wood
Act! SDK Support
Community Moderator