Activity Forums Salesforce® Discussions What is the difference between 15 digit and 18 digit id in Salesforce?

  • Piyush

    Member
    September 24, 2019 at 3:24 am

    Hi Prachi,

    1. 15 digit case-sensitive version
    2. 15 digit ID is what will be received from within the user interface
    3. 18 digit case-insensitive and best used for manipulating data outside Salesforce
    4. 18 digit id is referenced through in the API and other 3rd party tools.
  • Saddam

    Member
    September 24, 2019 at 6:25 am

    Hi,

    One thing to note is that Salesforce IDs are case sensitive when they are 15 digit and insensitive when they are 18 digit.  This means you must take into account upper and lower cases when you export the data from the system for the case sensitive data elements.  If your using tools like vlookup in Excel to do comparison from various sources of data, be careful as Excel can incorrectly map the data since it is not case sensitive on the 15 digit id.

    The last three digits in the ID is a checksum.  A calculation to assure that the first 15 pieces of the ID are accurate for the object its being written into.

    So following that analogy just mentioned.

    15 digit case-sensitive version

    15 digit ID is what will be received from within the user interface

    18 digit case-insensitive and best used for manipulating data outside Salesforce

    18 digit id is referenced through in the API and other 3rd party tools.

    If you would like to convert the current user interface id to 18 digits this can be done by using a formula very simple formula.  I have seen a couple of versions of the formula but this is the one that worked best for me in my career.

    All you need to do is add a new formula field, text 18 characters with “CASESAFEID(ID)”

    Salesforce has a knowledge base article on this topic which gives clear instructions on how to use it.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos