Update Personal Options / Personalization Settings using UpdateUserSettingsSystemUser Request – Dynamics 365

User Review
0 (0 votes)

Recently we had a requirement to update the “Negative Currency Format” – Regional Options for all the users.

We could not find this option in our favorite plugin – User Settings Utility.

So to programmatically update it we use the below code.

Or using our most favorite plugin – SQL 4 CDS

Updating it to the required format – 5

The Result –

Get more details here-


Hope it helps..

C# Code –

 CrmServiceClient svc = new CrmServiceClient(ConnectionString); if (svc.IsReady) { var reqUpdateUserSettings = new UpdateUserSettingsSystemUserRequest(); // GUID of the System User reqUpdateUserSettings.UserId = new Guid("18392d47-9dc0-eb11-8235-00224808ff23"); // reference the usersettings Entity reqUpdateUserSettings.Settings = new Entity("usersettings"); // update the negativecurrencyformatcode to appropriate integer value reqUpdateUserSettings.Settings.Attributes["negativecurrencyformatcode"] = 5; var response = (UpdateUserSettingsSystemUserResponse) svc.Execute(reqUpdateUserSettings); }


update usersettings set negativecurrencyformatcode = 5
where systemuserid = '18392d47-9dc0-eb11-8235-00224808ff23'