Thursday, 21 January 2021

How to provide navigation in VF Page for lightning and classic

 Hi ,

We are going to discuss that how we can provide navigation when we have to navigate to another VF page from a VF page in lightning and classic.


if('{!$User.UITheme}'=='Theme4d' || '{!$User.UITheme}'=='Theme4u' ||                         '{!$User.UITheme}'=='Theme4t') {              

             //Lightning

              sforce.one.navigateToURL(urlLink);

} else {

           //Classic 

window.location.href = urlLink;

}


References:

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_variables_global_useruitheme.htm

No comments:

Post a Comment

Differences between Agentforce for Service and Einstein Bots

 Hi , There are a few differences between Agentforce for Service and Einstein Bots. Agentforce vs. Einstein Bots ...