Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //add _launchCrossApp() function to the base controller and invoke as below
- const semanticObject = "MyCustomApp";
- const semanticAction = "display";
- let mParams = {};
- mParams["myParameter"] = "myValue";
- this._launchCrossApp(semanticObject, semanticAction, mParams);
- // the function
- _launchCrossApp: function _launchCrossApp(semanticObject, semanticAction, mParams) {
- const oCrossAppNavigator = sap.ushell.Container.getService("CrossApplicationNavigation");
- // generates a hash for the Fiori Launchpad to follow
- const hash = (oCrossAppNavigator && oCrossAppNavigator.hrefForExternal({
- target: {
- semanticObject: semanticObject,
- action: semanticAction
- },
- params: mParams
- })) || "";
- // navigates to the new hash
- oCrossAppNavigator.toExternal({
- target: {
- shellHash: hash
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement