Qus:    What is the difference between 15 digit and 18 digit id in Salesforce?
Feb 12, 2021 12:17 1 Answers Views: 816 LALITH
Prev Next
Answers (1)
RAMU Feb 13, 2021 08:56
Answer:   Normally, when a Salesforce user pulls the id from a record through the interface on any object they get the 15 digit id by design. So, if you created a report on Leads / Account / Contacts or any custom object and add the id field through the interface it will look something like 0015000001Fn4VL.
However, if you were to access that same Salesforce account id via an API or a tool like this from the Apex Data-loader & workbench 0015000001Fn4VLAAZ.
The last three digits in the ID are a checksum. A calculation to assure that the first 15 pieces of the ID is accurate for the object it’s being written into.
15 digit ID is case-sensitive.
15 digit ID is what will be received from within the user interface.
18 digit ID 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)”

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect