bdunagan

Brian Dunagan

December 28 2016
Salesforce Tip: Adding US Timezone to Accounts

For my company’s email campaigns, we use a customer’s US time zone to determine when a particular email gets sent out. I added it as a custom formula to Accounts.

Let’s walk through how to set up a custom formula:

  1. Go to “Setup” > “App Setup” > “Customize” > “Accounts” > “Fields”.
  2. Click on “New” under “Account Custom Fields & Relationships”.
  3. For the field settings, use “Formula” for “Data Type”, an appropriate label for “Field Label”, and “Text” for “Formula Return Type”.
  4. For the formula, I translate “Billing State” into the time zone. See my version in the GitHub Gist below.
  5. To verify your version, use “Check Syntax”.
# Salesforce Custom Formula for US Timezones based on Billing State
# Note there are 51 because DC counts.
CASE(BillingState,
"HI","US-PST",
"AK","US-PST",
"WA","US-PST",
"OR","US-PST",
"CA","US-PST",
"NV","US-PST",
"MT","US-MST",
"WY","US-MST",
"ID","US-MST",
"UT","US-MST",
"CO","US-MST",
"NM","US-MST",
"AZ","US-MST",
"ND","US-CST",
"MN","US-CST",
"WI","US-CST",
"SD","US-CST",
"IA","US-CST",
"IL","US-CST",
"KY","US-CST",
"TN","US-CST",
"AL","US-CST",
"MS","US-CST",
"AR","US-CST",
"MO","US-CST",
"LA","US-CST",
"TX","US-CST",
"OK","US-CST",
"KS","US-CST",
"NE","US-CST",
"MI","US-EST",
"OH","US-EST",
"IN","US-EST",
"GA","US-EST",
"FL","US-EST",
"SC","US-EST",
"NC","US-EST",
"VA","US-EST",
"WV","US-EST",
"PA","US-EST",
"DC","US-EST",
"MD","US-EST",
"DE","US-EST",
"NJ","US-EST",
"NY","US-EST",
"VT","US-EST",
"ME","US-EST",
"NH","US-EST",
"RI","US-EST",
"CT","US-EST",
"MA","US-EST",
"-")
Salesforce Tip: Lookup Contact by Email via Enhanced Lookups Datacube: Replacing my sales analytics app with Salesforce
LinkedIn GitHub Email