QUESTION:
I am getting the following error from DupeBlocker when it attempts to auto-merge a record:
DupeBlocker 2:
*** Executing Method: DB_AutoMerge.asyncMerge
*** Exception Type: System.QueryException
*** Exception Cause: null
*** Exception Message: No such column 'mycustomfield__c' on entity 'Lead'. 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.
DupeBlocker 3:
>*** Current User: Joe User (juser@gmail.com)
>*** Org Info: XYZ Company (00DXXXXXXXXXXXXXXX)
>*** Executing Method: DB_AutoMerge.asyncMerge
>*** Exception Type: System.QueryException
>*** Exception Cause: null
>*** Exception Message: No such column 'mycustomfield__c' on entity 'Lead'. 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.
>
>*** Merge ID: 00Qe000000486DvEAI
>*** Master ID: 00Qe000000486DqEAI
>*** Scenario ID: a14e0000001EOSSAA4
ANSWER:
This error occurs when the field mentioned in the error, in this case mycustomfield__c, was recently deleted or renamed AND this field had been listed in the auto-merge mappings for one of your Scenarios, in this case a Lead Scenario, set to auto-merge.
If you have a merge mapping set up and delete that field, the mapping will remain but it will no longer be displayed on the auto-merge settings screens. There are multiple ways to resolve this:
- Manually find the mapping by exporting the CRMfusionDBR101_AutoMerge_Mapping__c table for that scenario, i.e. where CRMfusionBDBR101_Scenario__c = 18 digit scenario ID.
- NOTE: If you do not have the 18 digit ID then you can use the multi-table join capability in DemandTools to link to the scenario table and then export based on the scenario.name field. The DupeBlocker 3 error message WILL have the 18 digit scenario ID.
- Look for the field API name, then delete that mapping record via DemandTools or Data Loader.
- Use the Salesforce Developer Console to find and delete the field. To do this select the "Query Editor" option and run the following SOQL:
- SELECT crmfusiondbr101__merge_field__c,id FROM crmfusiondbr101__autoMerge_mapping__c WHERE crmfusiondbr101__scenario__c = '{scenarioID from error message}'
- Review the query results to locate the field from the error message. Select "Delete Row" after highlighting the row in the results to delete the row from the table.
- Create a new custom field temporarily with the same field API name, then remove the mapping directly in the Salesforce User Interface (auto-merge settings button in the scenario), then delete the field.
- Undelete the field (if you still have that option) and remove the _del from the API name then go back to auto-merge settings remove that mapping, then delete the field again.