Hi everyone,
In Project Tracker application, for object Project, procedure AddBusinessRules is automatically executed.
However, in my application this procedure is not executed at all. I set breakpoint inside the procedure, but it is not executed. Below is my code excerpt. Please advice. Thank you very much in advance. -------------- Protected Overrides Sub AddBusinessRules()
AddSharedCommonRules() MyBase.AddBusinessRules()
End Sub
AddSharedCustomRules()
Where are you in the stack when you are trying to see this behavior?
For example, you won't see this during a Fetch by default or in the Create if you override that method.
In Project Tracker application, it happens when opening existing project (ie, Edit project - select a project - click OK)
In my application, I follow the same logic as project tracker, but AddBusinessRules not executed.
Are there any "pre-requirements" for this to work?
Thanks.
AddBusinessRules() is called exactly once per type per appdomain. So the first time any of your code interacts with the rules subsystem for a specific type that'll cause that type's rules to be initialized and cached.
Normally this is triggered by a CheckRules() call - which in turn is normally triggered by a SetProperty() call in a property.
Copyright (c) Marimer LLC