12-06-2010 04:35 PM
I am looking for a .Net method to add a Contact to a Company. I have my Company object, and I have my Contact object, but I cant seem to figure out how to add the contact to the company.
You would think there were be a method like, MyCompany.LinkContact(MyContact). Much like the MyContact.SetCompanyLink(MyCompany)
Does anyone know how to do it?
Thanks,
b
12-06-2010 05:22 PM
you have answered your own question.. you have both a company object and a contact object
and you asked 'how to add a contact to the company'
MyContact.SetCompanyLink(MyCompany)
all you have to do is MyContact.Update() to save the link
12-07-2010 05:28 AM
That doesn't work, or should I say it doesn't do what I want it to do.
Instead of keeping the contact at it's already assigned company, it links the company to the contact..
I want to add the contact to the company as contact not a linked contact.
12-07-2010 05:33 AM
12-07-2010 08:35 AM
Nevermind again. It still doesn't have the expected results. If I use that method, it adds the contact as a Linked Contact. So if I try and add that contact to another company it removes it from the original company that I added it to.
I need the behavior that occurs if you are on a Company record, and you click Add/Remove Contacts. This action allows you to add a contact to several different companies without effecting the contacts Parent Company or removing that contact from any other company's contact list.
Thanks again
12-07-2010 09:15 AM