cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CAP - Node - Fiori List Report: How to refresh List Report Page programmatically?

abelousov
Active Participant
0 Kudos
149

Hello Experts,

I created a Fiori List Report app (node.js, OData V4) with an (unbound) action which adds root rows into the list. However the List Report Page is not refreshed after the action, so I have to click "GO" to display the change.

As far as I know we can apply so-called Side Effect to the action to refresh the entity view. Side Effect works well on the Object Page, indeed. I used the annotation in service.cds:

@( Common.SideEffects : { TargetEntities : ['in/items'] } ) // refresh the sub-entity list on the Object Page.
action Action(); // bound to the root entity action.

However I failed to get the same effect for the root entity (on the Report List Page). How should the annotation look like to refresh the list for root entity? Thank you in advance.

Accepted Solutions (1)

Accepted Solutions (1)

abelousov
Active Participant

I resolved the problem.

For unbound action it should be so:

service.cds:

service Service {

@Common.SideEffects: { TargetEntities: ['/Service.EntityContainer/app'] }
action Unbound();

entity app as projection on my.App;
}

 

Answers (0)