Interview Question
Qus: What is the difference between 15 digit and 18 digit id in Salesforce?
Answers (1)
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)”