07-28-2008 01:57 AM
Is there any particular reason why the Add() method of the ContactList is private? I crossed over this issue as i tried to add a single contact (contact object) to a particular group. There is a method (SetStaticContacts) in the group manager expecting the list of contacts. So the idea was to get the existing contacts from the group (thus contact list) and to add my contact to the list and apply the list again to the group. But there is no add method for the contact list and i did not found any "add contact to group" method.
Is this a wrong approach? Which is the best way to add a single contact to the group?
07-29-2008 08:45 AM
Haven't tried this but it looks like there's also a method called UpdateContactStaticMembership which takes a single contact as a parameter which may work for you. Another option would be to load the contact ids from the contact list into an array, add the new contact's id to the array and use the getcontactsbyID method to create a new contact list from the array. Hope that made some sense