Print this page

Error: You cannot set a hierarchy field to point to itself or a child record

Knowledge Article Number 000006840
Description
 
You might come across the following error message when editing records:
 
You cannot set a hierarchy field to point to itself or a child record.
 
 
 
Resolution

This error occurs when a record points to itself (via a lookup field) or when it points to a child record (via hierarchy field).

Example scenarios:
 
Merging Accounts
 
  • 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
 
  • 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.
This one is a more complex scenario. Assume you have the following structure.
  • User A
  • User B
  • User C
Also
  • User B is the Manager for User C
  • User C is the Manager for User A
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. 

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. 
 




promote demote