7/1/2025 5:34:33 PM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
|
|
|
|
Copy Contact
Posted: 08 Dec 09 10:13 AM
|
I need to be able to copy a contact from one account to multiple other accounts. Is there an easy way to do this that I'm not seeing?
I can write the SQL to insert a new contact to those accounts, but I'm not sure how to generate a new ContactId?
Any advice would be appreciated. |
|
|
|
Re: Copy Contact
Posted: 08 Dec 09 10:49 AM
|
There is no way to Copy the Contact directly, but you could Implement a routine to do so, similar to:
IContact newContact = EntityFactory.Create();
newContact.FirstName = origContact.FirstName; newContact.LastName = origContact.LastName; ... ... newContact.Account = newAccount; newContact.Save();
//No need to generate ID, the Object will generate it for you. If you need to get the ID, you can retrieve it after you Saved the contact
|
|
|
|
Re: Copy Contact
Posted: 08 Dec 09 10:53 AM
|
Ummm.....
I just recalled something, the MoveContact method has a CopyContact flag.
So, you could call the MoveContact function, and pass it a True on the CopyContact parameter. The code then does exactly what I mentioned regarding the Properties, it copies them one by one. |
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|