Community
Showing results for 
Search instead for 
Do you mean 
Reply

Create Secondary Contact programatically

New Member
Posts: 1
Country: USA

Create Secondary Contact programatically

It seems like it would be obvious but I can't seemed to locate the Class/method for creating a Secondary Contact, There's plenty of info on getting the list of them and "Promoting" them to Primary Contacts but how do you create them in the first place? TIA
Copper Contributor
Posts: 98
Country: United States

Re: Create Secondary Contact programatically

[ Edited ]

Here is a code snippet I found.

Hope this helps.....

-----------------------------------------------

ContactList lSecondaries;

Contact nSecondary;

Contact cContact;

ActFramework actFm = new ActFramework();

actFm.LogOn("C:\\Documents and Settings\\< username >\\My Documents\\ACT\\Act for Windows 10\\Databases\\Act10Demo.pad",

"Chris Huffman","");

cContact = actFm.Contacts.GetMyRecord();

lSecondaries = actFm.Contacts.GetSecondaryContacts(null,cContact);

nSecondary = (Contact)((IBindingList)lSecondaries).AddNew();

nSecondary.FullName = "SecondaryFN ContactLN";

nSecondary.Fields["Contact.E-mail", false] = Test@test.com;

nSecondary.Updated+=new Act.Framework.MutableEntities.MutableEntity.UpdatedEventHandler(nSecondary_Updated);

----------------------------------------------



Message Edited by Carlton_Jones on 02-25-2008 12:17 PM
Carlton Jones
Sage Software