Best way to copy contacts from one list to another
I'm trying to figure out the best, most efficient way to copy thousands of contacts to another list. I was attempting to use the C# wrapper library method GetListContacts() to extract the list of contacts and then the CreateAddContactsActivity() to write the list of contacts into a new list but I can't seem to get the list of contacts into the correct format for the Create... Any guidance would be most appreciated.
Re: Best way to copy contacts from one list to another
I shared some information with you via email, and I will share it again here so that others who may have this question can get answers as well.
The best method for copying the contents of one list to the other is to get the contents of the first list using GetListContacts which will give you an IList<ResultSet>. You can then take that and iterate through the list of contacts and copy the details that you wish to keep into an AddContactsImportData object. Once you have copied the details, add the new object to a list.
Then once the list has been created, you can use that list to create an AddContacts object, which can be used for the CreateAddContactsActivity method.
You can post a new message in the Community or find us on Twitter Mon-Fri 8am-8pm ET, Sat 10am-8pm ET, & Sun 10am-6pm ET. We've got real people waiting to help you out. Click below to start a conversation!