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
SabrentSabrent 

No such column 'SobjectType' on entity 'DuplicateRecordSet'.

No such column 'SobjectType' on entity 'DuplicateRecordSet'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.
 
String query =[Select id,DuplicateRecordSetId,Name,RecordId from DuplicateRecordItem Where DuplicateRecordSet.SobjectType='Contact'];
        
return Database.getQueryLocator(query);
NagendraNagendra (Salesforce Developers) 
Hi Rov,

Sorry for this issue you are encountering.

From the above code, it seems like there is no such field which you are trying to query. In the SOQL query you are fetching DuplicateRecordSetId
field and in the where condition you are checking DuplicateRecordSet.SobjectType='Contact']. If you think DuplicateRecordSetId is the correct field you are fetching then update the same in the where condition as below.
String query =[Select id,DuplicateRecordSetId,Name,RecordId from DuplicateRecordItem Where DuplicateRecordSetId.SobjectType='Contact'];         
return Database.getQueryLocator(query);
Please let us know if this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra

 
Raj VakatiRaj Vakati
I am also facing the same issue .. looks like the Field DuplicateRecordSet.SobjectType is not showing on object when i open from the developer console .. use Record Id FIeld now 

 
SabrentSabrent
Thanks @RajVakati and @Nagendra 

I ran the following in Dev Console and also workbench and found the only fields available to use are the ones in my query. 

So basically we can't use SobjectType, ParentId from DuplicateRecordSet
and RecordId from DuplicateRecordItem
 
list<DuplicateRecordItem> query =[Select id,DuplicateRecordSetId,Name,RecordId from DuplicateRecordItem];         
system.debug(query);

list<DuplicateRecordSet> query = [Select DuplicateRuleId, Name, RecordCount FROM DuplicateRecordSet]; 
system.debug(query);