bpolaski

Programatically search for AF Groups and add new contacts

Discussion created by bpolaski on Jul 27, 2011
Latest reply on Jul 29, 2011 by Ahmad Fattahi

Is it possible in the AFSDK to search for AF Groups directly?  I believe I could perform a search for all AF Contacts on the system and then check the AFContactType property on each one, e.g.:

 
AFNamedCollectionList contacts = AFContact.FindContacts(_afServer, null, AFSearchField.Name, AFSortField.Name, AFSortOrder.Ascending, int.MaxValue);

foreach (AFContact contact in contacts)
{
     if (contact.ContactType == AFContactType.Group)
     {
          Console.WriteLine("AF Group found: " + contact.Name);
     }
}               

 

 

but this doesn't seem efficient (especially on a large scale system).  Is there a better approach?

 

Supposing I were able to find a desired AF Group, is it possible to programatically add other AF Contacts (or Delivery Endpoints) to that group?

Outcomes