Error – Hierarchy Constraint Violations

This is a Salesforce constraints – we can not make a record parent of the same record. This is also called self-reference.

Example:

Suppose you have a custom lookup field on Account which looks to Account itself and you try to populate the same Account Id to the lookup as that of the record then you will see this issue.