I have two IDs that are the same when comparing the 15 character version of each other (the only difference is capitalization). When I attempt to query the data for ID #1 I am receiving the data from ID #2. I tried querying the 18 character version of ID#1 but nothing gets returned? Has anyone ever encountered this issue before?
ID#1 = a1e1E000002KVhJQAW ID#2 = a1e1E000002KVhjQAG
for example by query is: SELECT Name FROM Contact WHERE ActiveDUId__c='a1e1E000002KVhJQAW' and nothing is returned
Idtype, the query should not return records of the other id (assuming the capitalization is correct). Internally in Apex, only 18 character ids are used. Like cropredy said, it could be a sharing issue, maybe you can try to make the classwithout sharingto rule that out. – user254875486 Nov 18 '21 at 18:19IDvalue. You may want to convert to a relationship field instead or do asubstring to 15 characters& query for records. – Sachin Hooda Nov 18 '21 at 18:23