Hi Constant Contact Support,
I am unable to rename the contact list in the constant contact account using the API in the Java code. The code snippet is mentioned below.
Iterator it = lscontactlists.iterator();
String strList = "Test";
while(it.hasNext())
{
ContactList value = (ContactList)it.next();
value.setName(strList);
}
There is only one contact list in the account. However it is not getting renamed from the above mentioned code. Can you please look into this and let me know the solution?
Thanks & Regards,
Srinivas
The code you are doing is just changing the name in your local Java Object. You still need to do the HTTP update request to Constant Contact to send the change back to us. If you are doing that and the name is still not updating, can you share the rest of your code?
Dave,
Thanks a lot for looking into the problem. The attached file has the source code that is being used for uploading the members. I am not sure if the following lines in the attached source does the HTTP update request to Constant Contact:
// Set List id
contactlist.add(String.valueOf(iListId));
// Set list name for upload
objAddContactsRequest.setLists(contactlist);
If not can you please suggest a Java based example which renames the list in a Constant Contact account?
Thanks & Regards,
Srinivas
Hi,
It looks like we have the methods to getLists, deleteList, and addList in the Java SDK, but may not have a method to update a list. We are looking at adding a method to our Java SDK to allow a list to be updated (renamed). You were trying to use contact methods to update a list, instead of using list methods. Once we build the needed functionality in, you should be able to use a getList call and then an updateList call to rename your list.
I will post back here with an ETA when we have one (or when we update the SDK, if it's sooner rather than later). Thanks for bringing this to our attention!
Best Regards,
Shannon Wallace
Partner API Support Engineer
Hi Shannon,
Thank you so much for looking into the problem. Please let me know once the rename list method is implemented so that I can start using it in my code.
Thanks & Regards,
Srinivas
The holidays have come and gone. For many seasonal businesses, this means the rush of shoppers has decreased as well. Instead of turning off the lights and waiting for spring, make your email marketi...
See Article