If you want to open a specific route from your SAPUI5 application to open another application within the Fiori Launchpad (FLP), you might wonder how to do this with the CrossApplicationNavigation service?
Well, the parameters, which can be sent through the method toExternal, are not clearly documented. Although there are possibilities to set the route via the parameter appSpecificRoute.
openReservation: async function (sReservation) {
if (sap.ushell && sap.ushell.Container && sap.ushell.Container.getServiceAsync) {
const oCrossAppNav = await sap.ushell.Container.getServiceAsync("CrossApplicationNavigation");
const hash = oCrossAppNav.toExternal({
target : { semanticObject: "Reservation", action: "display" },
params : { reservation: sReservation },
// Adding here the correct route to directly open the detail page.
appSpecificRoute: "/detail"
});
} else {
console.log('Routing not possible');
}
}
The target and params can be as well passed to the object, which will be later get called.
More links regarding this topic:
https://sapui5.hana.ondemand.com/#/api/sap.ushell.Container%23methods/getServiceAsync
Leave a Reply