function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jose ZunigaJose Zuniga 

Assigning a value to usr.TimeZoneSidKey

Usr is User data type. I tried:

usr.TimeZoneSidKey     = '(GMT-06:00) Mountain Daylight Time (America/Denver)';

but I get the next error after trying to insert:

15:19:03:036 FATAL_ERROR System.DmlException: Insert failed. First exception on row 0; first error: INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST, Time Zone: bad value for restricted picklist field: (GMT-06:00) Mountain Daylight Time (America/Denver): [TimeZoneSidKey]

but '(GMT-06:00) Mountain Daylight Time (America/Denver)' is one of the picklist values for TimeZoneSidKey.

Any help, please?
Thanks
Jose
Best Answer chosen by Jose Zuniga
@Karanraj@Karanraj
Jose,

Check this link for the possible values for the TimeZoneSidKey field - http://www.salesforceben.com/list-timezonesidkey-salesforce/
usr.TimeZoneSidKey     = 'America/Denver'

All Answers

@Karanraj@Karanraj
Jose,

Check this link for the possible values for the TimeZoneSidKey field - http://www.salesforceben.com/list-timezonesidkey-salesforce/
usr.TimeZoneSidKey     = 'America/Denver'
This was selected as the best answer
Jose ZunigaJose Zuniga
Thanks S.Karanraj. It worked as you indicated