R34821 ProfitCenter - Check Hierarchy For Deactivation

Code R34821
Entity Finance.Accounting.ProfitCenters Entity
Name CheckHierarchyForDeactivation
Attribute IsActive |
Layer Back-End
Events Commit
Priority Normal
Modify NO
Applicable Legislations ALL // no condition needed
Action If (IsActive == False) |

, validate that:

ProfitCenter.All(SubProfitCenter.IsActive == | False)
Description The profit center can not be deactivated, if any of its child profit centers are active.
Message The profit center {Name} can't be deactivated. It has active subcenters.
Version
Revocable NO

* For more information about the Business Rules Documentation Template and a short explanation of each column, see topic System Business Rules.