cancel
Showing results for 
Search instead for 
Did you mean: 

Navigating back to Fiori Launchpad Home Page after event

MattHarding
Active Contributor
0 Kudos

Hopefully this is a very simple question, but just wanting to know what semantic navigation object/Action or alternative approach I should use to navigate back to the home page from a custom Fiori-like app. 

e.g. I'd like to perform a message Toast at the same time as navigating back to the Launchpad at the end of a scenario.

I've read about using Window as one option, but I'm hoping there is a more official way of doing this.

Thanks,
Matt

Accepted Solutions (1)

Accepted Solutions (1)

former_member182874
Active Contributor
0 Kudos

Hey Matt,

I generally use:

window.history.go(-1);

window.history.go('URL');

Regards,

Tejas 🙂

MattHarding
Active Contributor
0 Kudos

Hi Tejas,

Thanks - I realise that is one option, but as the use of Window is generally frowned upon within UI5, I was hoping for a more approved way of doing this.  But definitely my backup plan.

Cheers,

Matt

Former Member
0 Kudos

The semantic object for the Fiori Launchpad Home page will be "#".


var oCrossAppNavigator = sap.ushell.Container.getService("CrossApplicationNavigation");

oCrossAppNavigator.toExternal({

                      target: { semanticObject : "#"}

                     });

MattHarding
Active Contributor
0 Kudos

Thanks Sakthivel for this. Will assume this works and use this in the future solution (though I've ditched integrated FLP due to being on UI add-on SP10 where app-cache-buster isn't yet working (working in SP11). Must say I think Maksim's solution is a nice simple approach too (more intuitive than #) since this is one scenario where getCore() is perfect for integrated FLP apps.

Former Member
0 Kudos

Hello,

I am getting error while using this code

  1. var oCrossAppNavigator = sap.ushell.Container.getService("CrossApplicationNavigation"); 
  2. oCrossAppNavigator.toExternal({ 
  3.                       target: { semanticObject : "#"
  4.                      }); 

Error in Browser Console.

Uncaught TypeError: Cannot read property 'getService' of undefined

rajiv_kumar20
Explorer
0 Kudos

This message was moderated.

Answers (1)

Answers (1)

former_member182372
Active Contributor
0 Kudos

If you are in FLP just do

sap.ui.getCore().byId("homeBtn").onclick();

"emulate" click on Home button in shell header, lazy, I know, but works  😉