Hi,
Being very excited about the possibilities of custom functions, I tried adding some to one of our existing OPM projects. Unfortunately on doing so I got an error telling me to use an entity-function (OPA-E00209). The error could be traced back to an error rule for one of the project's entities, that uses the error()-function.
I recreated this scenario in a small test project with one entity (the person) and I got exactly the same problem. The error rule (in this case for the entity ‘the person’) works fine as long as there is no custom function:
Error(“The person’s birth date cannot be in the future!”) if
the person’s birth date > the current date
As soon as I add a custom function, the error rule no longer works and I get an error telling me to use an entity function.
In my project I need the error rule to fire for every instance of the entity, so for me I don't think using an entity function is really an option.
My guess is this behaviour is somehow related to custom functiones being faux entities. But I don't know how or why.
Any help is greatly appreciated!
Best regards,
Jonas