Need to extract names and phone numbers from a group, and add it to a users “Contacts”, does anyone have suggestions on the best way to script this out?
Subject: details
your request is quite vague, please be more specific. For instance, where are you extracting the names and phone numbers from? There are no phone numbers in groups.
Subject: Good Point
What we are going to need to do is read the list of names for the group, then look up those names in the NAB, one by one, and extract the name, and contact information (email, and phone numbers)
The import that information into a user’s personal contact list.
I’m thinking that this is not going to be easy.
Subject: not too difficult but …
it would take some time to write a script that would efficiently do what you want and unfortunately I do not have the time to do that for you. basically:
-
Get the group
-
loop through the names in the group
-
for each name do a lookup to $Users to see if person doc exists
-
if found, lookup the user in personal contacts to make sure it does not already exist
-
if it already exists either skip it, overwrite it or replace it (your choice)
-
next name