Link to home
Start Free TrialLog in
Avatar of bfpnaeechange
bfpnaeechange

asked on

Country/Region is not visible in Global Address List but does appear in ADUC

Hi all.  I use the following code successfully to create users in the Users container along with a mailbox.  The country is populated by querying sql, then doing an IF statement, then setting the attribute.

My problem is that when I use this vbscript code to create a contact, the Country/Region field is blank.  I can go back into the GUI of ADUC and change to a different country and then apply....then change back to the original country and it then shows up in the GAL.

This issue also happens when creating users.  This happens in the Users container as well as the Contacts OU.

Any ideas?  I am running Exchange 2003.
strCountry is the value pulled from my SQL query.

                      vCountry = "USA"
      vCountryCa = "Canada"
      if  strCountry = vCountry then sCountry = "US"
      if  strCountry = vCountryCa then sCountry = "CA"
if sCountry <> "" then
      oContact.put"c", sCountry
      end if


The country/region shows up in ADUC.

Avatar of Justin Owens
Justin Owens
Flag of United States of America image

If you use ADSI Edit to compare the two contacts in AD, one which does not show up correctly and one which does, do you see any null fields in the one which does not show up correctly which are populated in the ones that do?
Justin
Do you have a "oContact.SetInfo" line anywhere? Maybe try adding it to your IF block, as per the following

if sCountry <> "" then
      oContact.put"c", sCountry
      oContact.SetInfo
      end if


ASKER CERTIFIED SOLUTION
Avatar of bfpnaeechange
bfpnaeechange

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial