01-03-2013 08:37 PM
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.
01-04-2013 06:36 AM
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");
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.