Home Analyst Portal
Options

Changing Portal localization automatically

Steve_BarnardSteve_Barnard Partner IT Monkey ✭

Hi,

Working with a customer who has offices in Germany and I've just set the portal localizations for German language. Their AD account has the 'country/region' field populated with 'Germany'. I need to be able to set the Portal/SQL tables so that when a user from Germany logs into the portal, they have the German settings by default. They shouldn't have to go to User Settings and change it manually.

I created this SQL script but it's trying to overwrite a key in the UserPreferences table when the user already exists therefore it fails.

INSERT dbo.UserPreferences (UserId,Preferences)

VALUES

((SELECT DISTINCT Id

FROM dbo.CI$User cu

WHERE

NOT EXISTS (SELECT * FROM dbo.UserPreferences up

WHERE cu.Id = up.UserId)

AND cu.Country = 'Germany'),

('{"LanguageCode":{"Id":"DEU","Name":"German"},"LanguageCodeDateTime":{"Id":"DEU","Nam.........)

What is the best method to achieve this?

Thanks

Steve

Answers

Sign In or Register to comment.