on 08-31-2021 11:41 AM
hi ,
we have a Custom UI5 app, from which we wish to navigate to another UI5 App using CrossApplicationNavigation.
but in my Custom UI5 app, am getting error as on using this code.
var oCrossAppNavigator = sap.ushell.Container.getService("CrossApplicationNavigation");
VM784:1 Uncaught TypeError: Cannot read property 'getService' of undefined
at <anonymous>:1:47
my UI5App is deployed on SAP Enterprise Portal.
Regards
Govardan
I think you have to run it in fiori launchpad.
if you run it as standalone app, you won't have it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tired including this ffp-bootstrap.js file at Index.html as shown below
<script src="/com.sap.portal.navigation.flp.resources/scripts/optimize/ffp-bootstrap.js?"></script>
& in respective controller ?
sap.ui.define([
"sap/ui/model/json/JSONModel",
'sap/m/MessageToast',
'sap/m/MessageBox',
'sap/ushell/services/CrossApplicationNavigation',
'sap/ushell/services/Container',
], function (BaseController, JSONModel, MessageToast, MessageBox,Container) {
.
.
.
.
.,_crossAppNavigation:function(){
jQuery.sap.require("sap.ushell.services.CrossApplicationNavigation");
var oCrossAppNavigator = sap.ushell.Container.getService("CrossApplicationNavigation");
var hash = (oCrossAppNavigator && oCrossAppNavigator.hrefForExternal({
target: {
semanticObject: "EP--123****23-CHILD_APP_NAME",
action: "display"
},
params: {
ClaimNumber : ClaimNo
}
})) || ""; // generate the Hash to display a Supplier
oCrossAppNavigator.toExternal({
target: {
shellHash: hash
}
});
},
.
.
.
.
.
Even then am not able to navigate.
on clicking my portal FLP outside the tile area in the launch pad , and checking the below in the console am able to access the getService of the sap.ushell.Container.
sap.ushell.Container.getService("CrossApplicationNavigation")
check this.
https://launchpad.support.sap.com/#/notes/2694687
your app is running as standalone, I believe.
check in your developer tool if your app is under a iframe.
User | Count |
---|---|
82 | |
11 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.