Skip to Content
Oct 22, 2021 at 02:15 PM

RAP: Validation on child node


Hi All,

I'm facing an issue using RAP. My model contains of 2 entities (parent and child 1..N) with draft support. A child entitiy could be created from the object page of the parent node using default functionallity (create). For one of the fields of my child node a validation is added. But when leaving the create page of this child object page the validation is not executed (I suppose this could be solved by using side effects).

But also during activation (save) of my (root) entity this validation is not triggered. How should this validation being triggered?

On root level i added below code in my behaviour definition:

  draft determine action Prepare  {
    validation validateDevelopmentId;
    validation validateEnhancementType;
    validation validateMandatoryFields;

Code is added so my validations are executed during save and possible incorrect fields will be marked red.

How to achieve the same for child nodes?

And is there a way to check the mandatory fields automatically?

With below code only a red * is added in front of the field.

  field ( mandatory : create ) DevelopmentId, EnhancementType;