The Local Time App for Salesforce has out-of-the-box support for getting the time zone information for Account, Contact, Lead, and Task standard Salesforce objects. We have now extended the App’s functionality to also support the Salesforce User object.
There are two options to show the time zone information on the User records. Option 1 is to add the Local Time lightning component to the User lightning record page layouts. However, if you want to have time zone information stored as custom fields, so that you can use them in your User related processes and automations, then Option 2 is the preferred solution.
This blog post describes the steps involved in enabling Option 2.
Pre-requisite
It is assumed that you have installed Local Time App version v2.29 or later in your sandbox and production environments. You can install the latest version of the App from this link.
Process
- Configure the App for the User object.
- Enable the triggers on the User object.
- Add the Timezones related list to the User object page layout.
1. Configure the App for the User object
From Local Time Config tab -> Settings subtab, configure the User object to use the appropriate address and phone fields. Click the Save button to update the App settings.
2. Enable the triggers on the User object
From Local Time Config tab -> Settings subtab, enable the triggers on the User object and click the Save button to update the App settings.
3. Add the Timezones related list to the User object page layout.
Modify the User lightning record page layouts and add the Timezones object as a related list and save the page layout settings. After this step, whenever a user record is created or updated, you will see the time zone information as shown below in Option 2.
The child Timezone (API Name: tz__Timezone__c) record has all the relevant custom fields that you can query and use in your automations.