You may have resources in different timezones, this article explains how to deal with those.
In order keep configuration simple, please perform the following steps in Salesforce Classic (Booker25 is Lightning-Ready, you may afterwards use the app in Salesforce Lightning as you please) |
Salesforce always renders Date and DateTime fields relatively to the timezone of the user that is viewing them. This means Booker25 needs some specific fields to allow for correctly inputting and outputting reservation dates and times. |
In the Resource hierarchy, make sure that every timezone's top node (defining the timezone of itself and its children) has the correct timezone filled in in the Timezone field. Its children will automatically be given the same timezone
Now strictly follow the following matrix for inputting and outputting reservation dates and times in either the reservation's resource's timezone or the viewing user's timezone:
Input / Output | Fields Label | Field API Name | What? | Where? | Type |
---|---|---|---|---|---|
Input on Reservation form | Start (local time) | B25__StartLocal__c | Start date & time | Resource local timezone | Date/Time |
Input on Reservation form | End (local time) | B25__EndLocal__c | End date & time | Resource local timezone | Date/Time |
Output | Local Start Date | B25__Start_Date__c | Start date | Resource local timezone | Date |
Output | Local End Date | B25__End_Date__c | End date | Resource local timezone | Date |
Output | Local Start time | B25__Local_Start_Time__c | Start time | Resource local timezone | Text(5) |
Output | Local End time | B25__Local_End_Time__c | End time | Resource local timezone | Text(5) |
Output | Local Start Datetime | B25__Start_Local_DateTime__c | Start date & time | Resource local timezone | Formula(Text) |
Output | Local End Datetime | B25__End_Local_DateTime__c | End date & time | Resource local timezone | Formula(Text) |
Output / Input through API or Process | User Start Datetime | B25__Start__c | Start date & time | Viewing user timezone | Date/Time |
Output / Input through API or Process | User End Datetime | B25__End__c | End date & time | Viewing user timezone | Date/Time |
The following screenshots display a real world example based on a resource in London (GMT) and a user in Amsterdam (GMT+1) |
Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.
|