+ Start a Discussion

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.



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.