How to set User CI and user settings fields based on country
Also is there a way to also set the language and date time setting in the portal for users based on the country and state field?
So if i have a user in australia and Queensland it will set my timezone as being +10 and my date time to English (Australia)?
thanks for your help
Justin
Best Answer
-
Konstantin_Slavin-Bo Customer Ninja IT Monkey ✭✭✭✭We also only use 1 timezone and language setting for our users, but you could achieve both things with Orchestrator or Powershell. For SCSM, both the time zone and locale is located in the UserPreference.Localization object, which is related to the User CI with the UserHasPreference relationship. For the portal, the settings is located in the ServiceManagement DB in the CI$User table; [LocaleID] and [TimeZone].
So you should get the User CI, and get the Localization object through the UserHasPreference relationship (or simply "Localization" for Orchestrator). Now, if the relationship exists, you simply need to update it. If not, you will need to create a new Localization object (remember to generate a GUID), update it with the correct values from the User CI fields you have synced, and relate it to the User CI.
At the same time, you can update the CI$User table to match the preferences synced to the User CI.
5
Answers
HTH
So you should get the User CI, and get the Localization object through the UserHasPreference relationship (or simply "Localization" for Orchestrator). Now, if the relationship exists, you simply need to update it. If not, you will need to create a new Localization object (remember to generate a GUID), update it with the correct values from the User CI fields you have synced, and relate it to the User CI.
At the same time, you can update the CI$User table to match the preferences synced to the User CI.