Loading
Extend Salesforce with Clicks, Not Code
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          CASESAFEID

          CASESAFEID

          Converts a 15-character ID to a case-insensitive 18-character ID. In Salesforce Classic, the function converts only valid Salesforce 15-character IDs. If you pass in an invalid ID, the function returns the ID passed in. In Lightning Experience, the function converts any 15-character ID.

          Use

          CASESAFEID(id) and replace id with the object’s ID.

          Tips

          • Convert to 18-character IDs for better compatibility with Excel.
          • The CASESAFEID function is available everywhere that you can define a formula except reports and s-controls.
          • If you’re using Lightning Experience, and you want the function to convert only valid 15-character IDs, contact Salesforce Customer Support to enable this functionality.
          Formula Example in Salesforce Classic
          Formula Example in Salesforce Classic
          CASESAFEID (Id)

          This formula replaces the 15-character ID with the 18-character, case-insensitive ID.

          • CASESAFEID('A01xx000003DHur') returns A01xx000003DHur. The ID isn’t valid because it begins with a capital letter.
          • CASESAFEID('001xx000003DHur') returns something like 001xx000003DHurAAG because the ID passed in is valid.
           
          Loading
          Salesforce Help | Article