This criteria function will be very helpful for ConditionalAppearance and Validation rules as well as for the Action's TargetObjectsCriteria property, because it will help avoid writing a lot of routine code.
For instance, currently it is necessary to either introduce a hidden calculated property in the business class for further use in the criteria:
C#public bool IsNewObject
{
get
{
return Session.IsNewObject(this, false);
}
}
or create a Controller and manually execute some code (e.g., disable or deactivate an Action) agains tthe IObjectSpace.IsNewObject result.
Proposed usage of the built-in IsNewObject criteria function in the criteria string: "IsNewObject(This)" or "IsNewObject(Manager)"
Yes, yes, yes, a thousand times, yes!
ok,ok, I have this property in my BaseObject since XAF exists (7 years or so?) and then just forgot that it is not built in.