This sample inserts a secondary contact into MyRecord in an Act! database. The sample shows the following tasks:
/// <summary>
/// Inserts Secondary contact to MyRecord
/// </summary>
private void InsertSecondaryContact()
{
ActFramework ACTFM = new ActFramework();
ACTFM.LogOn("C:\\Documents and Settings\\Administrator\\My Documents\\ACT\\Act for Win 8\\Databases\\Act8Demo.pad", "Chris Huffman","");
Contact actContact = ACTFM.Contacts.GetMyRecord();
ContactList secondaryContactsList = ACTFM.Contacts.GetSecondaryContacts( null, actContact );
Contact secondaryContact = (Contact)((IBindingList)secondaryContactsList).AddNew();
string firstName = "John";
string lastName = "Smith";
string title = "Accountant";
.
.(add values for other properties)
.
secondaryContact.FullName = fName + " " + lName;
secondaryContact.Fields["Contact.Title",false] = title;
.
.(assign additional properties to secondary contact)
.
secondaryContact.Update();
}