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

How to include a screen flow in a Lightning Web Component

 Hi, Assume  you have a flow called "Quick Contact Creation" and API Name for the same is "Quick_Contact_Creation". To i...