Overview
Each record in Salesforce has two record IDs. One is a 15 digit case sensitive record ID and the other is an 18 digit record ID, which is not case sensitive. If you are working with Salesforce data in an application such as Microsoft Excel, using a function like VLOOKUP to match records, the returned matching records will ignore the case. This could potentially create invalid matching of data. While there might be many ways to solve this problem, one approach would be to perform the VLOOKUP on the 18 digit record ID, which is not case sensitive.
Note: VLOOKUP is short for Vertical Lookup, which is a function in Excel that is designed to work with data in columns.
When you create custom reports using the Salesforce Report Builder, the 15 digit record ID is the one that is available to display on reports. This article provides information on how to use the 18 digit record ID to display on reports. You can create a custom field with a formula to capture the 18 digit ID to display the custom field on your custom reports.
Use the steps in this article to:
Create a Custom Formula Field
The Account Object is used in the steps below as an example for including the 18 digit Salesforce record ID on your Accounts. However, you can add a custom formula field to any Object.
- Click the Gear icon and select Setup.
- From the Object Manager, select the desired Object. The Account Object is used in the example below.
- Select Fields & Relationships.
- To add a custom field, click New.
- Under Data Type, select the Formula radio button.
- Click Next.
- Enter a desired Field Label, which will default as the Field Name.
- From the Formula Return Type, select the Text radio button.
- Click Next.
- Enter the Formula as: CASESAFEID(Id).
- Click Next.
- Select the appropriate Field Level Security for this profile.
- Click Next.
- Select the appropriate page layouts for this new field.
- Click Save.
Add the New Formula Field to a Report Type
You can update an existing Report Type or create a new Report Type for including the new formula field.
- If you are still under Setup after saving the new formula field, click the Home tab to display the Quick Find search textbox. Otherwise, click the Gear icon and select Setup.
- Enter Report Types in the Quick Find search textbox. Then, select Report Types.
- Depending upon your setup, click Continue. Otherwise, skip to the next step.
- Locate the Report Type that you want to edit, and click the hyperlink name.
Note: If the Report Type is “Managed (only certain attributes are editable),” a new formula field cannot be added. A new Report Type would need to be created by clicking the New Custom Report Type button. Also, if the Report Type is "Managed," when you click the hyperlink name, a message displays to clearly indicate a "Managed" Report Type. - Click Edit Layout.
- Click the Add Fields Related via Lookup hyperlink.
- Based upon the location of the new formula field, select the appropriate hyperlink.
Note: In the example above, the new formula field was added under the Account Object. - Scroll down the page, and select the new formula field name.
- Click OK.
- Click Save.
From here, you are able to create or update custom reports to include the 18 digit Salesforce record ID, as necessary.
Comments
0 comments
Please sign in to leave a comment.