cancel
Showing results for 
Search instead for 
Did you mean: 

SAP RAP - Trigger determination on save without field changes

saurkhare
Participant
0 Kudos

Hi,

I've a RAP-based app - Managed, Draft enabled.

I've a determination at the parent entity level

determination updateInvoice on save { create; update; }

So I expect the determination to trigger on save whenever I hit save in the edit mode. The problem is the determination only triggers if I update/change the value of at least one field before hitting save.

I would like to have the determination trigger on save irrespective of whether I update any fields or not. How can I achieve that? Is there a way I can insert a dummy entity update somewhere after the user hits save to force-trigger the determination?

Regards,

Saurabh

View Entire Topic
saurkhare
Participant

This can be done in the behaviour definition in draft determine action Prepare by using the keyword        ( always ) with the validation, determination that you want to trigger irrespective of the trigger condition

 

 

  validation simulateInvoiceUpdate on save { create; update; }

  determination updateInvoice on save { create; update; }

  draft action (features : instance) Edit;
  draft action Activate;
  draft action Discard;
  draft action Resume;
  draft determine action Prepare { validation ( always ) simulateInvoiceUpdate;
                                     determination ( always ) updateInvoice; }