on 01-19-2021 8:55 AM
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?
I face the similar issue with BTP Launchpad Service. sap.ushell.Container is undefined.
This an application launched from BTP Launchpad service.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
8 | |
8 | |
7 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.