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
sjain1.2523113033806995E12sjain1.2523113033806995E12 

Set the Timezone to create a customer portal Users Internally.

Hi Guys,

                I want to set the Organization Timezone when creating a customer portal users internally.

                User u1 = new User(contactId=con.Id, username=con.Email, firstname=con.FirstName,
                lastname=con.LastName, email=con.Email,communityNickname = con.LastName + '_' + Rnd,
                alias = string.valueof(con.FirstName.substring(0,1) + con.LastName.substring(0,1)), profileid = pf.Id,           emailencodingkey='UTF-8',languagelocalekey='en_US', localesidkey='en_US'); i ahve given a hard coded timezone in User field. How to set the organization timezone here.Any help would be appreciated.

 

Pradeep_NavatarPradeep_Navatar

It is not possible to give organization timezone when we create a user internally. Because there is no field in organization related to timezone to query and there is no any global variables for this.