Internal record IDs in salesforce.com, as found in all custom and standard objects such as the opportunity, account, contact, and so on contain 15 character text-based values.
The text values can be described as a base-62 number as each of the individual 15 characters can be either a numeric digit (in the range 0-9), a lowercase letter (in the range a-z), or an uppercase letter (in the range A-Z).
These 15 character salesforce.com values are therefore case-sensitive, since there can be two unique IDs which owe their uniqueness to the fact that they have a character(s) that differs only in case. For example, 100000000000ABC is different to 100000000000abc.
However, there are applications such as Microsoft Excel, which are not case-sensitive, that do not recognize the difference between the ID 100000000000ABC and the ID 100000000000abc. This results in features such as the Excel function VLOOKUP
, failing to match correct records from an exported salesforce.com report.
Salesforce.com realized the potential problem where the case of the source lookup value is not processed correctly within external applications that are not case-aware.
To provide better compatibility between salesforce.com and tools such as MS Excel, MS Access, and SQL Server salesforce.com has established an 18-character case-insensitive ID that is formed by adding a suffix to the 15 character ID, a method that respects the case-insensitive nature of these tools.
In this recipe, we will convert a 15-character case-sensitive ID to an 18-character case-insensitive ID.
Carry out the following steps in order to convert a 15-digit Salesforce opportunity ID to 18 digits:
Opportunity ID (18 Chars)
in the Field Label textbox.CASESAFEID( Id )
18.221.165.115