You need to sign in to do that
Don't have an account?
Sergey Volinets
I can`t change User`s Time Zone by Apex trigger? Can`t set up picklist value properly.
I have read a apex trigger. This trigger must set change time zone of new user. But I recived error message, I don`t know what casuses the problem and how to do it properly.
My trigger:
My trigger:
trigger TimeZone on User (before insert) { for (User u : Trigger.new) { u.TimeZoneSidKey = '(GMT+02:00) Central European Summer Time (Europe/Paris)'; } }Error:
Please try below code I have tested it worked for me.
Hope this helps you!
Please accept my solution as Best Answer if my reply was helpful. It will make it available for other as the proper solution. If you felt I went above and beyond, you can give me kudos.
Thanks and Regards
Sandhya