1 person found this helpful
HS.AppSettings.ValidationAccount as you can probably guess just looks at the AppSettings to determine the Validation Account. It's just pulling the property from the Metadata.
The Validation Account(there can only be one) is an account that if it's not 0, will cause the entity to fail, meaning you can't promote the entity. It's irrelevant without process management.
As an example, you could have a validation account called "BalanceCheck" and have that contain the total of the balance sheet. If it's not 0 (i.e. balanced) you can't promote the entity.
In order to get around the limitation of one Validation Account, it's common to make the validation account a parent level account, so that you can have multiple validation accounts under it. If any of those base accounts have a value that rolls up to the parent, it will cause the validation to fail.
Once you have your metadata items set, you need to write the rule that will populate the account. For the Balance Sheet check example, you could copy the Parent Level Balance Sheet account, however it's usually a good idea to build in some kind of logic for rounding at a minimum, if not going a step further and making it so immaterial out of balances don't lock the entity. Most people won't care if their Total Company Balance Sheet is out of balance by $10.
A word of caution though... you can't bypass the validation. If you build something, and an entity fails, you can't promote the entity unless you resolve the validation error.