Skip to Content

Cross Application Navigation with Routing

Hi.

I have coded cross application navigation logic to navigate from one component to another, however I would like to nagivate to a specific route in the target component.

Scenario:

I have two apps:

  1. Credit App (Source App)
  2. Query App (Target App)

The target app has the following CrossNavigation and Routing config in the manifest:

......
"crossNavigation": {
	"inbounds": {
		"intent1": {
			"signature": {
				"parameters": {},
				"additionalParameters": "allowed"
			},
			"semanticObject": "Query",
			"action": "Manage"
		}
	}
}

.....

"routes": [
{
	"name": "Overview",
	"pattern": "",
	"target": ["Overview"]
},
{
	"name": "create",
	"pattern": "Create",
	"target": ["Create"]
},

In the Source app I have coded the following cross app navigation logic which loads the target component without any issue,

var oCrossAppNav = sap.ushell && sap.ushell.Container && sap.ushell.Container.getService("CrossApplicationNavigation");
var href_For_Query_create = (oCrossAppNav && oCrossAppNav.toExternal({
target: {
semanticObject : "Query", action : "Manage" 
}, 
params: {
  "SoldTo" : sSelectedSoldTo,
  "SalesOrderNo" : sSelectedOrder,
  "Subject" : "Y2"
  }
})) || "";

I would like it to route to the Create target ("/Create") target and not the Overview target( ""). How should the navigation be coded to include the target hash route in the url?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Dec 26, 2018 at 07:48 AM

    Hi Sergio,

    As far as I know, Navigating to specific route pattern of Target App is possible by one way :-

    You can catch the parameters which is sent from Source App in the "_routePatternMatched" method of Target App and compose the routing pattern with the help of Source App's parameters (through navTo or getRoute) and move to the specific view to corresponding route pattern.

    Add comment
    10|10000 characters needed characters exceeded