cancel
Showing results for 
Search instead for 
Did you mean: 

Custom back button not work in fiori launchpad

thomasnguyen1
Discoverer
0 Kudos

Dear experts,

Please help me, I am facing issue with back button with existing sap ui5 apps.

I have 2 Fiori elements applications:

  • app1: List report for search.
  • app2: Object page for create.

The steps to follow are: 

  • Search in List report, then click on a row to navigate to Object Page.
  • After filled in data, click save -> navigate to the List report.

At this point, if I click the back button of the Fiori launchpad in List report, it will return to the Object Page. I want to customize the back button so that clicking on it will return to Shell-home instead of Object Page.

I have tried following the instructions using ShellUIService and setBackNavigation, but it still doesn't work.

Link: https://sapui5.hana.ondemand.com/sdk/#/api/sap.ushell.ui5service.ShellUIService%23overview

Here is my code, the _handleBackBtn function I put in the onAfterRendering event.

thomasnguyen1_0-1708145430621.png

I already have tried using sap.ui.getCore().byId("backBtn"), jQuery("#backBtn") to get the button and then attach event attachPress, but on the Fiori launchpad, it cannot be retrieved and reports undefined, although it can still be accessed when running locally.

In my manifest file of List Report, I have add outbounds for navigate to Object Page.

The version in use is 1.120.1 for cloud only and use OData V4.

Please help me to check and if you really have any ideas. Let me know in case you need any details.

View Entire Topic
boghyon
Product and Topic Expert
Product and Topic Expert

setBackNavigation has never been a public API. There is no guarantee that private methods will continue working in different environments such as with the central FLP shell on e.g. Cloud Foundry.

If you need a new technical feature, please consider following the note 2469897 - How to submit a feature request for Fiori launchpad.

thomasnguyen1
Discoverer
0 Kudos
Thanks for your reply.