cancel
Showing results for 
Search instead for 
Did you mean: 

Navigating back to FLP programmatically on CF

WFlats
Participant
0 Kudos

Hi,

I have an MTA project with some apps and an FLP.

In the apps I want to exit and navigate back to the FLP in case e.g. some essential configuration data is missing.

But I cannot get the ushell or router history working as intended. It seems there are differences in the UI5 versions and between Neo and CF.

This was generated by the template project:

onNavBack: function () {
var sPreviousHash = History.getInstance().getPreviousHash(),
oCrossAppNavigator = sap.ushell.Container.getService("CrossApplicationNavigation");
if (sPreviousHash !== undefined || !oCrossAppNavigator.isInitialNavigation()) {
// eslint-disable-next-line sap-no-history-manipulation
history.go(-1);
} else {
oCrossAppNavigator.toExternal({
target: { shellHash: "#Shell-home" }
});

},

But oCrossAppNavigator is undefined (Container undefined).

I tried
- var oCrossAppNav = sap.ushell.Container.getService("CrossApplicationNavigation") - Container undefined
- var oContainer = sap.ushell.services.Container - Container undefined
- the routine from the API description:
sap.ushell.Container.getServiceAsync("CrossApplicationNavigation").then(function (oService) {
var sHref = oService.hrefForExternal({
target: { semanticObject: "Product", action: "display" },
params: { "ProductID": "102343333" }
}) || "";
// do something with sHref
}); - Container undefined

Does anybody know how to create a CrossApplicationNavigation instance? Or any other way to navBack to FLP?

View Entire Topic
0 Kudos

I face the similar issue with BTP Launchpad Service. sap.ushell.Container is undefined.

This an application launched from BTP Launchpad service.

0 Kudos

Hi, I am also facing same issue. Did anyone get the solution ?