cancel
Showing results for 
Search instead for 
Did you mean: 

Routing Issue in Cross App Navigation - Custom Fiori Apps

former_member187439
Active Participant
0 Kudos

Hi, I'm trying to fix a major issue in another developer's code. Explaining the scenario and issue below. Any help towards a solution would be appreciated, thanks!

Apps and screens involved in the issue:

Custom Fiori App 1 : Screen 1 (single view) , Screen 2 (master & detail view)

Custom Fiori App 2 : Screen 1 (master & detail view)

Navigation To: In App1, on click of a button in Screen 1's footer, navigation is happening to Screen 2 in the same app. Now on click of a button in Screen 2's footer, the navigation is happening to App 2. - this is working fine.

Navigation back: On click of the back button in the master page header, the navigation is supposed to happen to Screen 2 in App 1 since the user just came from there. But it is not working that way. It is going to Screen 1 of App1. Here is the code of the back function:

onBack:function()

{

  this.oRouter.detachRouteMatched(this.handleNavTo, this, this);

  var oCrossAppNavigator = sap.ushell.Container.getService("CrossApplicationNavigation");

  oCrossAppNavigator.toExternal({

  target: {semanticObject : "ZManageAccount", action: "displayMangeAccount" }

  });

}

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member187439
Active Participant
0 Kudos

Surprised to not see even a single response for the first time in SCN!!! 😞

Am sure we would have some routing experts in here or at least people who have experimented routing and navigation!

agentry_src
Active Contributor
0 Kudos

Hi Kavitha,

It does happen occasionally, but it is unusual during a regular business week.  I am actually more surprised that no one has Alerted the Moderators for failure to search.  Many of the SAPUI5 experts have been doing so for solutions which already exist.  Yours may not fall into that category, however, you have not mentioned which previous discussions or other content sources that would apply to show you have searched and tried the other solutions.

Why do I say this?

Use this Google Custom Search  and the terms: cross application navigation in sapui5.  Take a look at the apparently applicable results to see if your answer is there.  If you do not find some direction there, let the community with which ones you tried and were unsuccessful.  I am no expert on SAPUI5, so others may still AM your Discussion.  Showing you searched by eliminating existing solutions as not fixing the problem is a good way of avoiding that.

Regards, Mike (Moderator)
SAP Technology RIG

Former Member
0 Kudos

In App 1 you have to define routes for screen 1 and 2, then in your onback function use the appropriate route in your navigation for your desired destination screen.  see below:

Step 3: Navigation and Routing - UI Development Toolkit for HTML5 (SAPUI5) - SAP Library