While attempting to merge accounts, if you're encountering the error
"Error querying account fields. Be sure that the Account object does not contain a custom field with the same API name as a packaged field." this page will help you resolve that.
This error occurs because there are Account or Contact fields in the Nimble AMS package that have the same API name as custom fields that your org has added to the Account or Contact object.
For example, Nimble AMS includes a field on the Contact object with the full API name
NU__Degrees__pc. The person account merge fails if you have either:
- A Contact field with the full API name of
- An Account field with the full API name of
Tell Me More
There is a Salesforce platform limitation related to how
Database.Query() parses the fields for account merging. The Nimble AMS person account merging functionality is included in the Nimble AMS package, which has the
NU namespace, and the parser incorrectly assumes that
NU is the namespace for every non-namespaced custom field on the Account and Contact object.
Resolving the Issue
One option is to change your custom field's API name so it no longer conflicts (Method 1).
However, we understand that that may be inconvenient or downright risky. For example, if your custom field is used in multiple integrations, changing the API name will break those integrations. So we offer another (albeit more technical) option if changing your field's API name is not an option (Method 2).
Method 1: Change Your Custom Field Name
- Follow these steps from Salesforce: Error: 'Duplicate field selected' for Contacts merge in NPSP
This is a knowledge article that affects the Salesforce Nonprofit Success Pack (NPSP). Since it's a managed package like Nimble AMS (NU), it encounters the same problem when merging accounts.
Method 2: Add a Class that Overrides the Account Merge Tool's SOQL Query
AccountMergeExtensionApex class that implements the Salesforce Callable interface:
Create a new Event Handler custom metadata type record:
Merge Accounts Extension
Event Handler Name
After following either method, try merging accounts again. The error should report back if there are any other conflicting fields. If it is still not working, contact Nimble AMS Support.