How to solve insufficient access rights when merging records

Last published at: January 3rd, 2022
Delete

When merging duplicate records as a Salesforce administrator, you probably don't run into many problems. However, when your users merge records, you have to deal with complex permissions and rights in Salesforce. To resolve problems with permissions and access rights, here is a checklist of the things you can do in Salesforce that will solve your merging issues.

1.  My user has no access to the merge page

Error message

Insufficient Privileges
You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary. For more information, see Insufficient Privileges Errors.

Solution

The user has no access to the 'Dc3Merge' Visualforce page.

  • Navigate to Salesforce Setup - Manage Users - Profiles
  • Click on the profiles name that is assigned to your user
  • Scroll down to 'Enabled Visualforce Page Access'
  • Click 'Edit'
  • Move 'dupcheck.Dc3Merge' from 'Available Visualforce pages to 'Enabled Visualforce pages'
  • Click 'Save'

2. My user is not allowed to view all records that are selected for merging

Error message You are not allowed to view all the records you have selected for Merging.
Solution

This error message is triggered when there is a conflict with access rights in the Salesforce Sharing Rules. The Sharing Rules are defined in the Salesforce Setup. Go to Salesforce Setup - Security Controls - Sharing Settings.


Default Internal Access Merge behavior

Private A standard user can only merge records of which they are owner.

Public Read/Write A standard user can only merge records of which they are owner.

Public Read/Write/Transfer A user can merge all records, when the user has delete rights for the Object.

3. My user can only 'Set for Merge', not perform the actual merge.

Error message No error message is triggered, the user gets a 'Set for Merge' button instead of a 'Merge' button.
Solution

This button appears when the user does not have 'Delete' rights on the Object. This 'Set for Merge' button allows the user to flag the records as potential duplicate records. The records will be set for merge and are displayed at the DC Job page for an administrator to merge.

Solution 1: Give the user delete rights on the Object.

  1. Navigate to Salesforce Setup - Manage Users - Profiles.
  2. Click 'Edit' at the profile name that is assigned to your user.
  3. Scroll down to 'Standard Object Permission'
  4. Make sure your user has 'Delete' rights on the Object you want to perform a merge in
  5. Click 'Save'.
  6. The 'Set for Merge' button now changed to 'Merge'.

Solution 2: Override CRUD when performing merge. Give the user permission to merge without delete rights in the Object.

  1. Navigate to the DC Setup page.
  2. In the Objects menu, navigate to the Object you want the user to merge in without delete rights.
  3. Navigate to the *Object* Settings tab.
  4. At 'Override CRUD when performing merge. All users can merge when they have read access to the record', change the 'disabled' value to 'enabled'.
  5. The 'Set for Merge' button now changed to 'Merge'. The user is now able to perform a merge without delete rights.

4. Insufficient access to related records

Error message Merge Failed: Merge failed. First exception on row 0 with id#; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: []
Solution

This error message is triggered when there is a conflict with access rights to a related record. In the merge process, Duplicate Check re-parents all related records to the master record. To be able to do this, the user needs sufficient access to these related records in order to reparent them.

Solution 1: Make sure the user has sufficient access to the related record according to the sharing rules.


Private A standard user can only re-parent records of which they are owner.

Public Read/Write A standard user can only re-parent records of which they are owner.

Public Read/Write/Transer A user can re-parent all records, when the user has delete rights for the Object.

Solution 2: Give the 'Read' and 'Edit' rights on the Object.

  1. Navigate to the Salesforce Setup - Manage Users - Profiles.
  2. Click 'Edit' at the profile name that is assigned to your user.
  3. Scroll down to 'Standard Object Permission'
  4. Make sure your user has 'Read' and 'Edit' rights on the Object.
  5. Click 'Save'.