AX throws an error "This organisation participates in one or more hierarchies and cannot be deleted" when you try to delete an operating unit if it is used in one or more organizational hierarchy.
Here is a way to delete operating unit,
1) Table: OmOperatingUnit - get recid using name or name alias(this recid will be used in next three steps).
2) Table: DimensionAttributeValue -> Field: EntityInstance -> search recid in this field and delete record.
3) Table: OMHierarchyRelationship -> Field: ChildOrganisation -> search recid in this field and delete record.
4) Table: OMOperatingUnit -> Field: recid -> search recid and delete record.
Here is a way to delete operating unit,
1) Table: OmOperatingUnit - get recid using name or name alias(this recid will be used in next three steps).
2) Table: DimensionAttributeValue -> Field: EntityInstance -> search recid in this field and delete record.
3) Table: OMHierarchyRelationship -> Field: ChildOrganisation -> search recid in this field and delete record.
4) Table: OMOperatingUnit -> Field: recid -> search recid and delete record.
Hi Farhan,
ReplyDeleteStill I am getting the same error.
Did it work for you?
-Wamik
Yes.. it worked for me, you need to check OmOperatingUnit related table(s).There must be one or more records in related table(s) which you need to
ReplyDeletedelete manually.