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
Marco PoloMarco Polo 

Identify if a value in a record is the same as the value on another record.

We receive from an external system different records that have a field called Serial__C that contains the same value for certain records. 

For example:

Record A: Serial__c = 12345
Record B: Serial__c = 12345

I would liek to create a query that group in a list all the Sobject that have the same value in the Serial__c.
 
RituSharmaRituSharma
Your query will be like below:

Select Id from Account where Serial__c = '123456'
Abdul KhatriAbdul Khatri
Hi Marco,

Can you be more clear?
  • Is Serial__c is an External Id?
  • Looks like it is not unique and can be on multiple records, which doesn't sounds good?
  • In your last request you are asking group in a list of all the SObject, little confuse with that?

Can you clarify what are you trying to do (specially with the group) so help can be done accordingly?
Abdul KhatriAbdul Khatri
Are you able to resolve the issue by yourself?