This error occurs when a record points to itself (via a lookup field) or when it points to a child record (via hierarchy field).
- You have created a custom lookup field on the Account object, which points to itself.
- You have two accounts, Account A and Account B
- On Account A, Account B is assigned on the custom lookup field
- On the Merge Accounts wizard, you select B as the master record and you keep the old value from Account A's lookup field (which is Account B)
- Account A will be deleted and Account B will be kept, but Account B's lookup field points to itself, hence the error occurs.
User Hierarchy custom fields
This one is a more complex scenario. Assume you have the following structure.
- You have created a custom user hierarchy field called "Manager".
- On a User record, you assign another user on the custom user hierarchy field
- Upon clicking Save, the error comes up.
User A cannot be the Manager for User B because User B is the Manager for User's A Manager (User C). In other words, User A would end up being their manager's manager.
- User B is the Manager for User C
- User C is the Manager for User A
In either scenario, you would need to make sure that the record you are editing doesn't point to itself or a child record before saving it.