3

I was trying to create a Process (using Process Builder) to update a Duplicated Lead with it respective "Parent Lead", through a custom field "ParentLead__c". But on when I was navigating from DuplicateRecordItem to DuplicateRecordSet to get the ParentId (and refer it on ParentLead__c) I noticed that this field isn't avalilable on Process Builder even this field is on Salesforce Documentation ( https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_duplicaterecordset.htm ).

I thought this could be a limitation of Process Builder, so I tried to run a SOQL Query on Developer Console to check it:

SELECT id, name, DuplicateRuleId, ParentId FROM DuplicateRecordSet

But I received this error message:

SELECT id, name, DuplicateRuleId, ParentId FROM DuplicateRecordSet ^ ERROR at Row:1:Column:35 No such column 'ParentId' 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.

Anybody know why ParentId isn't visible/enable? Or why is this field on Salesforce Docs?

2

From what you referenced:

Use this object to create custom report types and view the results of duplicate jobs.

I think the above explains why the ParentId isn't available to you in Process Builder. The purpose of the object is for reporting of results, not for manipulating records during processes.

Update:

I learned the object is "owned" by Data.com as part of their original integration package. I'm told the ParentId field is only visible when bulk deduplication is enabled. That detail was omitted from the documentation.

I hope this helps shed further light on what you're seeing.

  • But, I created a report type and this field ParentId isn't available too. Do you know why? – Átila Castro Alves Jan 30 '19 at 16:43
  • 1
    Its a reference field that's only available from API 42 and later. Unless your report type includes a reference to a Parent (a polymorphic field), that might be why. Even with a report type that included a reference to Parent, I still wouldn't expect a PB to process references to Parents on DuplicateRecordSets related to Reports. The object itself isn't triggerable. – crmprogdev Jan 30 '19 at 17:10
  • Yes... I forgot the idea of using PB. But even when I created report type the ParentId field isn't there to be chosen and included in report type layout! That's the problem... – Átila Castro Alves Jan 30 '19 at 17:21
  • @crmprogdev This field doesn't seems to be accessible through Apex. Schema.DuplicateRecordSet.getSObjectType().getDescribe().fields.getMap().get('ParentId') returns null. The field is also not listed on the key set for the fields map. If that's the case, then it most likely won't be accessible anywhere. – Renato Oliveira Jan 30 '19 at 18:10
  • @RenatoOliveira Since this is intended to be used with reports, while I've not checked, I'd expect the field to most likely only be available when accessed via the reporting API or the metadata API. Schema describes are frequently flaky at best for many objects of this type. – crmprogdev Jan 30 '19 at 23:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.