cancel
Showing results for 
Search instead for 
Did you mean: 

RAP: Validation on child node

10-22-2021 4:15 PM
mhappe Participant
4083 views 1 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

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;

Thanks!

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

mhappe
Participant

I Found the solution:

In the draft determine prepare validations of a child node could be added by the syntax:

validation <name of child entity> ~ <name of validation>;

Solution based on example " /DMO/I_TRAVEL_D":

Answers (0)