Loading
Prepare for Email to Become the Default Login ExperienceRead More
Set Up and Maintain Your Salesforce Organization
Custom Code and Locale Format Changes

Custom Code and Locale Format Changes

Address, currency, date, datetime, integer, name, and time formats can change when a user changes locales. These formats can also change when the locale format standard changes or formats are updated. Learn how to avoid errors by using locale-neutral methods in your code and review examples. Then understand how to verify that your integrations work with new or changed formats.

Required Editions

Available in: both Salesforce Classic and Lightning Experience
Available in: all editions
  • Use Locale-Neutral Methods in Code
    Data formats can change based on the user’s locale, adoption of new standards, or updates to the standard locale formats. To avoid errors when a locale format changes, use standard methods to handle this data in your code. If your code formats the data using the user’s locale, apply the format after all other processing is complete.
  • Example Code with Locale-Formatted Data
    Review examples of code that handles data that can be formatted based on the user’s locale. See how code can break when it relies on a specific format for dates, times, and currencies. And review examples of how to fix these issues by using standard methods for handling these types of data.
  • Update Your Integrations for New Locale Formats
    If you integrate data from external systems into Salesforce or if you send Salesforce data to external third parties, use locale-neutral formats whenever possible in the related code. When locale formats change, review the code that handles the affected formats.
 
Loading
Salesforce Help | Article