You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to retrieve user's timezone in groovy

Accepted answer
63
Views
5
Comments
in Sales 5 comments

Summary:

adf.context.getSecurityContext()?.getUserProfile()?.getTimeZone() is returning null instead of user's timezone

Content (required):

We want to retrieve logged in user's preferred timezone which they have selected under Regional Preference.

We used standard inbuilt function to retrieve user's timezone, however, it is returning null.

def timeZone = adf.context.getSecurityContext()?.getUserProfile()?.getTimeZone();




Version (include the version you are using, if applicable):

23B (11.13.23.04.0)

Code Snippet (add any code snippets that support your topic, if applicable):

def timeZone = adf.context.getSecurityContext()?.getUserProfile()?.getTimeZone();

println(timeZone)

--Output--

null

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!