Troubleshooting

Merge records (List of SObjects)

SObject row was retrieved via SOQL without querying the requested field

  • Cause: Fields required by the Duplicate Check Merge Rules are missing from the query.
  • Resolution: Query all required fields, especially fields with custom merge rules not set to “Master Record Rule.”

System.DmlException

  • Cause: The merge fails because the user lacks required permissions.
  • Resolution: Verify the user has Delete permission on the SObject being merged.

System.NoAccessException: Entity is not API accessible

  • Cause: The dc3Api class is part of a managed package, and the user’s profile or permission set does not grant them access to this class.
  • Resolution: Salesforce enforces Apex class visibility based on the Apex Class Access permissions in the user’s profile or permission set.

objectList should contain a minimal of 2 records.

  • Cause 1: The objectList contains too few records for a valid merge operation.
  • Cause 2: Providing records of different object types in objectList causes the merge to fail.
  • Resolution: Ensure the list contains at least 2 records of the same type for merging to occur.