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

What’s the difference between Einstein Article Recommendations and Suggested Articles?

How Does Einstein Article Recommendations Work? Einstein Article Recommendations helps support agents resolve customer cases efficiently by ...