cancel
Showing results for 
Search instead for 
Did you mean: 

Side effect after executing an unbound action - How to trigger update of result list?

gregorw
Active Contributor
2,138

Hello SAP Fiori Elements Community,

with the help of 20eed143c19f4b82bc4cf049916102cb my question Side effect after executing a bound action: How to trigger sorting of result list? was solved. But now I face a similar issue an unbound action. In my sample project bookshop-demo I've added the following annotation:

  @(Common.SideEffects.TargetEntities: ['/AdminService.EntityContainer/Books'])
  action   resetCountOfAllRoles();

to srv/admin-service.cds#L123. When I click resetCountOfAllRoles in the following screen:

The list should refresh to show 0 in the count column. But this happens not automatically. Only when I execute the search again I see the correct result:

Hope that such a behaviour is possible without implementing an extension.

Looking forward for your input.

Best Regards
Gregor

c-kobo
Product and Topic Expert
Product and Topic Expert

Hello Gregor,

the mentioned behaviour is reproducible and requires further investigation in the FE team.

Best Regards

Christian

gregorw
Active Contributor

Hi Christian,

thank you for the investigation. As a moderator I've made your answer a comment to later mark the answer that hopefully solves this behaviour as the solution. If needed I can also file an incident.

Best Regards
Gregor

marcel_waechter
Product and Topic Expert
Product and Topic Expert

Hi Gregor,

we invested some time to check the same. I have to tell you that it's not yet supported (therefore also not documented). We have to implement the same to support it.
I put it to our backlog and we try to implement it at the earliest. I can't promise any date right now. I'll inform you once we implemented it or can give you a reliable date.

Until then the only solution seems to be to use a custom action calling this action and use our extension to refresh the data:

https://ui5.sap.com/#/api/sap.fe.templates.ListReport.ExtensionAPI%23methods/refresh

Sorry to not be able to provide you a better answer and I hope you can live with the work around for the time being. And can remove it as soon as we provided the support.

Best regards,
Marcel

akuller_q
Participant

Hi marcel.waechter

is there already a new stand on this?

mantri_sagar
Explorer
0 Kudos

Dear marcel.waechter christian.kolbowski,

Is there any update on implementing side effect for unbound action ? Do we still need to use custom controller and ExtensionAPI for refresh ?

Regards,

Sagar

0 Kudos

also wondering - thanks

tested .refresh still works


var addrecords= function () {

this.base.editFlow.invokeAction("servicehandlermethod(write your own)", { model: this.base.editFlow.getView().getModel(), parameterValues: [{
name: "employeeUUID",
value: employeeUUID }, ],
skipParameterDialog: true
}) .then(function (results) {
that.base.getExtensionAPI().refresh(); });

monokizsolt7
Participant
0 Kudos

marcel.waechter pls implement ASAP

Accepted Solutions (0)

Answers (2)

Answers (2)

gwendal_moreau
Product and Topic Expert
Product and Topic Expert

Hi,

This feature is provided with SAPUI5 1.122. You can find the related documentation here, in the ODATA V4 section.

nlaenger
Explorer
0 Kudos
thanks for the feedback time for a version switch 🙂
gwendal_moreau
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Gregor,

We are working on the support of side-effects for Unbound action in coming versions and will come back to you when this feature is available.

Kind regards.

Gwendal.

gregorw
Active Contributor
0 Kudos

Thank you for the update Gwendal.

Caisi
Explorer
0 Kudos

Hello,

any updates on this feature? Is it already available?

Thanks.

nlaenger
Explorer
0 Kudos

Hi @gwendal_moreau,

any update on this topic?

regards

Norbert