11

Custom back button not work in fiori launchpad

 7 months ago
source link: https://community.sap.com/t5/technology-q-a/custom-back-button-not-work-in-fiori-launchpad/qaq-p/13608450
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Custom back button not work in fiori launchpad

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.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK