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.
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.