Troubleshooting

System.DmlException

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

objectList should contain a minimal of 2 records.

  • Cause 1: The objectList contains too few or too many 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 for merging to occur.

Merge Failed - Do not have proper sharing access on records.

  • Cause: The designated master record cannot be found due to sharing settings or because the record no longer exists.
  • Resolution: Make sure the user has access to the record, and verify if the record still exists.

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.