Community
Showing results for 
Search instead for 
Do you mean 
Reply

Help adding contact record through API v17 / Plugin

New Member
Posts: 5
Country: USA

Help adding contact record through API v17 / Plugin

[ Edited ]

Can someone give me some sample code on adding a contact record through the API v17 pro?  I'm brand new to ACT and its SDK, with some of the research i've done on these forums i have been able to sucessfully been able to get the correct assemblies into my project and now want to test some sample code adding Contacts programmatically if possible.  I will eventually try to do this through a plugin but some example of this for me to test with would be greatly appreciated..  

Copper Elite Contributor
Posts: 82
Country: Canada

Re: Help adding contact record through API v17 / Plugin

[ Edited ]

Something like this should work using a plugin

 

var ActApp = Act.UI.ActApplication.Instance;
var newContact = ActApp.ActFramework.Contacts.CreateContact();
newContact.FullName = "John Doe";
newContact.Update();

 

Ahsan Khalid

Chief Technology Officer
Keystroke Quality Computing Inc.
www.keystroke.ca

New Member
Posts: 5
Country: USA

Re: Help adding contact record through API v17 / Plugin

Exactly what i needed, now if i was to create this within a plugin and i wanted to then display the newly created contact for them is there a primary key i need to pull from this new record and how would i bind that to their navigational view within ACT?

Copper Elite Contributor
Posts: 82
Country: Canada

Re: Help adding contact record through API v17 / Plugin

You would use the UIContactManager object.

 

ActApp.UIContactManager.ShowContact(newContact);
Ahsan Khalid

Chief Technology Officer
Keystroke Quality Computing Inc.
www.keystroke.ca