From Ruchi Sharma: Preset browser timezone for Guest users
In Spring’21 Salesforce Scheduler introduced a feature to preset the timezone for the appointment time slots .
This feature sets the default time zone for all time slot pages, using the provided DefaultTimeZone flow variable.
We can use this feature to dynamically set the time zone in which guest users load time slots i.e. browser timezone.
This will only work for the Salesforce supported time zones, you can find the complete list here.
Preset browser timezone
We will fetch the browser timezone through the lightning component that will be exposed to the flow builder.
And to validate the browser time zone i.e. supported in salesforce or not, we will write an apex controller.
All the code is bundled at https://github.com/ruchi2994/browserTimeZone. It contains the lightning component, apex class, and updated flow.
After code deployment, enable TimeZoneController apex class access for the guest user profile.
Let’s look at how to use the lightning component in the flow to preset the browser timezone.
That’s it! Activate and run the flow.
Let’s see the demonstration.