Fiori - Cross Application Navigation

后端 未结 1 1656
天涯浪人
天涯浪人 2020-12-16 08:46

I want to navigate between the applications in launchpad. I have found with lot of searching that, through CrossApplicationNavigation in ushell is the way. Here is the link

相关标签:
1条回答
  • 2020-12-16 09:09

    Are you trying to run this locally? Because if so, then it doesn't work as expected, unless both the applications (the app where you've added the cross app code and the 'SalesOrder-create' app) are running in the "local sandbox"

    However if you have tried to run this piece of code in an app installed in a Fiori Launchpad on an SAP dev/test system, which also has the 'SalesOrder-create' app in the same launchpad, then it should work just fine.

    Also use the following way to check if the cross-app service is working, because it looks like your code always outputs #SalesOrder-create

    if (sap.ushell && sap.ushell.Container && sap.ushell.Container.getService)
    {
      var oCrossAppNavigator = sap.ushell.Container.getService("CrossApplicationNavigation");
    
       oCrossAppNavigator.toExternal({
                          target: { semanticObject : "SalesOrder", action: "create" },   //the app you're navigating to 
                            // params : { param1:data, param2:data}
                         }); 
      }
    else
    {
         jQuery.sap.log.info("Cannot Navigate - Application Running Standalone");
     }
    }
    
    0 讨论(0)
提交回复
热议问题