Community
Showing results for 
Search instead for 
Do you mean 
Reply

CreateCompanyFromContact(Contact c)

Highlighted
Bronze Elite Contributor
Posts: 2,119
Country: United_Kingdom

CreateCompanyFromContact(Contact c)

[ Edited ]

Hi,

 

I'm just wondering if I'm doing something wrong or if there is a bug or this is "working as designed" with the above method.

 

Here is my call:

actApp.ActFramework.Companies.CreateCompanyFromContact(c).Update();

 

Now the method works and creates the Company, however it does not associate the Contact with the Company. I had thought that the method would work similar to how it works in the Application.

 

I suppose I could simply use the Companies.UpdateLinkedContacts(comp, c) if that is how the Create method has been 

 

***UPDATE***

Curisor and curisor! Looks like I have to set the link first before using the UpdateLinkedContacts (I suppose it makes sense), so now its c.SetCompanyLink(comp); c.Update; Companies.UpdateLinkedContacts(comp,c);

****************

TIA

Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog
Highlighted
Employee
Posts: 1,163
Country: USA

Re: CreateCompanyFromContact(Contact c)

This is the intended behavior for this method, as you're already aware there is a another method for linking a contact with their company, I believe the idea is to not assume that the person creating the company also wants to have them linked.

Matthew Wood
Act! SDK Support
Community Moderator
Highlighted
Bronze Elite Contributor
Posts: 2,119
Country: United_Kingdom

Re: CreateCompanyFromContact(Contact c)

Hi Matthew,

 

Cheers for clearing that up. Bummer I thought that I could get away with a one liner bit of code here! Looks like maybe I'll actually have to work a little! Eeek!

Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog