function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ppiyushppiyush 

Salesforce IDs - in reports

Hi, I am using a formula field to get the Ultimate Parent (Account) of every contact and every opportunity - however obviously this is stored as a text field.

 

now, when I run reports on these contacts and opportunities, and try to restrict by the Ultimated Parent using this formula field, some contacts from other Accounts show up here which shouldnt.

 

I realized that this is happening because Salesforce is unable to differentiate between IDs with different cases if they are coming from a text field. Example:

 

Account ABC - 0012000000UDldR

Account DEF - 0012000000UDldr

 

Notice that the case of the last letter is different, but when creating a criteria in a report to filter by any of these IDs, Salesforce is unable to filter properly.

 

Any workaround for such an issue?

 

Best,

Pranav

Best Answer chosen by Admin (Salesforce Developers) 
Jeremy_nJeremy_n

You currently have an ID field that's getting passed down from parent to child. What if you add another field that passes down the Ultimate Parent Account Name also? In report criteria, specify both ID and name. It's unlikely that your accounts with similar IDs will have identical names as well.

 

As far as I'm concerned, I wish Salesforce would just use 18-digit IDs for everything. The case-sensitivity issue comes up with regularity.

 

Good luck!

 

Jeremy

All Answers

Jeremy_nJeremy_n

You currently have an ID field that's getting passed down from parent to child. What if you add another field that passes down the Ultimate Parent Account Name also? In report criteria, specify both ID and name. It's unlikely that your accounts with similar IDs will have identical names as well.

 

As far as I'm concerned, I wish Salesforce would just use 18-digit IDs for everything. The case-sensitivity issue comes up with regularity.

 

Good luck!

 

Jeremy

This was selected as the best answer
ppiyushppiyush

Hi Jeremy,

 

this is exactly what I implemented. thanks for the confirmation that there is no other way of doing this! :)

 

Cheers,

Pranav

 

p.s. I too wish that salesforce would only use 18 digit IDs...