Salesforce has a multi-tenant architecture and it identifies every record uniquely across all customers by assigning a unique Record ID to each record. As a Salesforce admin or developer, you need to perform data operations, write formulas and reference records using their unique Record IDs.
Salesforce provides you with two versions of Record IDs – a 15 character and an 18 character ID. The two versions are used in different situations.
You can read more about these two type of IDs here. As mentioned in the article – “Because there are applications like Access which do not recognize that 50130000000014c is a different ID from 50130000000014C, an 18-digit, case-safe version of the ID is returned by all API calls. The 18 character IDs have been formed by adding a suffix to each ID in the Force.com API. 18-character IDs can be safely compared for uniqueness by case-insensitive applications, and can be used in all API calls when creating, editing, or deleting data.”
Let us take a scenario where you are required to reconcile the data between a file extracted using an API tool and one from a Salesforce report. In this scenario, you will have a mismatch between the record Ids in both files. Wouldn’t it be nice to get the 18 character Record ID from the Salesforce user interface so that it exactly matches the ones given to the API tools? It will save you the time and effort in going into external tools and running separate queries and reports.
Follow the below given steps to convert 15 character IDs to 18 character IDs for any record:
With the help of this simple formula, you will have the 18 character case insensitive ID readily available on any Salesforce record which you can leverage in your APIs & data operations.
Team Varasi