What Is Record ID in Salesforce?
Every record has a globally unique identification across the org, value in its ID field which is generated at the time of record creation. That Record ID value will never change, even if the record is deleted and then undeleted.
Entering a known Record ID in Salesforce org URL will direct you straight to the details page of that record.
For example https://my-salesforce-instance-dev-ed.develop.lightning.force.com/<Record Id>
The first 3 characters of an ID indicate the object type.
For example Accounts – 001, Contacts – 003, Leads – 00Q, etc.
These prefixes can never be changed for objects.
Custom objects are assigned 3-char prefixes based on internal SFDC rules that we cannot predict.
There are two versions of Record IDs:
- 15-digit case-sensitive version: It is referenced in the user interface.
- 18-digit case-insensitive version: It is referenced through the API. The last 3 digits of it are the checksum of the capitalization of the first 15 characters.
A 15-digit id can be converted into an 18-digit id using CASESAFEID() function and to convert an 18-digit id into a 15-digit simply remove the last 3 digits from it.
Salesforce Record IDs are identical only in the Full Copy Sandbox and Production environments.