cancel
Showing results for 
Search instead for 
Did you mean: 

Override back button on FLP

Violina
Discoverer
0 Kudos
205

Hello,

I'm trying to override the back button behavior on Sap Build Workzone. My application is Fiori Elements with Fiori Freestyle with odata v4. I want to raise an exception when a user is in the Object Page in edit mode and clicks on the back button. I tried the suggestions here https://community.sap.com/t5/technology-q-a/flp-nav-back-button-issue/qaq-p/12142325/comment-id/4538.... But didn't work for me. I tried using this part:

this.getOwnerComponent().getService("ShellUIService").then(function(oShellService) {
    oShellService.setBackNavigation(function() {
        //either do nothing to disable it, or add your own nav back logic for having the navigation
    });
});

In the onAterRendering method of the Object Page controller, but it doesn't enter the setBackNavigation function. Can someone help with this issue.

 

Thanks,

Violina

View Entire Topic
Sankara1
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Violina, Thanks for reaching out to us, I believe that sap.ushell.Container is designed to implement dirty state flags specifically for this purpose. You can either attach a dirtyStateProvider https://sapui5.hana.ondemand.com/sdk/#/api/sap.ushell.Container%23methods/registerDirtyStateProvider (asynchronous) or directly set the dirtyState flag to true ( https://sapui5.hana.ondemand.com/sdk/#/api/sap.ushell.Container%23methods/setDirtyFlag) whenever the user modifies or enters data. I hope this information is helpful. Please Let us know if you have further clarification