In this post, We will explore the importance of adding Casesafeid and power of 1 fields on standard and custom objects. We download/run reports most of the time for issue Analysis. “Id” field on the report will give us a 15 digit case sensitive value. This 15 digit Id field is not helpful for analysis or comparison and we always end up using an 18 digit Case insensitive field when comparing data with External Systems. In order to solve this issue, most of us try to find ways in converting 15 digit id to 18 digits by using Excel conversion or quick Google search and copy-paste the 18 digit ids for analysis. Salesforce had cameout with a builtin Casesafeid function to solve this issue. We need to add a custom formula field with the desired name on Standard/Custom object with value as Casesafeid(id) which provides us with an 18 digit case-sensitive value. In the below demo we will add casesafeid field on Account Standard Object.
Object Manager–>Account–>Fields & Relationships–>Select formula field with type as Text
Enter the CasesafeId function as shown below in the formulae field and add it to desired page layouts if you want to see the 18 digit field on the layout.
Below is the screenshot of the 18 digit field Added to the Layout
Screenshot of Report with 18 digit id
- Always create casesafeId field on every standard and custom objects. This will save you time during Analysis and comparison of data from external systems.
- 15 digit id is case sensitive and 18 digit is case Insensitive
- Provide visibility to desired users to based on Profiles.
- You can add this 18 digit field to layout and restrict visibility only to Admins only