Sunday, September 16, 2018

Create a Custom Field that Displays the Timezone of a Customer Record Based on the State in the Billing Address

To create a custom field with a formula to identify the customer's timezone depending on the State entered in the Billing Address, perform the following steps:

     1. Navigate to Customization > Lists, Records, & FieldsEntity Fields > New.
     
     2. Provide a Label (e.g. US Timezone).
     
     3. Set Type to Free-Form Text.
     
     4. Uncheck Store Value.
     
     5. In the Applies To tab, check Customer.
     
     6. In the Display tab, set Subtab to Main.
     
     7. In the Display tab, set Display Type to Disabled.

     8. Click Validation & Defaulting tab.
     
     9. In the Default Value box, use formula below:

Case when {billstate} in ('CA','OR','NV','WA') then 'PST' when {billstate} in('MT','ID','WY','UT','CO','AZ','NM') then 'MST' when {billstate} in ('ND','SD','NE','KS','OK','TX','MN','IA','MO','AR','LA','MS','AL','TN','IL','WI') then 'CST' when {billstate} in ('MI','IN','KY','GA','FL','SC','NC','WV','OH','PA','VA','NY','VT','ME','NH','MA','RI','CT','NJ','DE','MD','DC') then 'EST' when {billstate} in ('AK') then 'AKST' when {billstate} in ('HI') then 'HAST'
Else CONCAT('N/A ',{billstate}) End

     
          Note: Formula is checked.
     
     10. Click Save.

No comments:

Post a Comment