Activity Forums Salesforce® Discussions How to Dynamically adjust the UI of the Salesforce Visualforce Page?

  • Aman

    Member
    April 26, 2018 at 5:59 pm

    Hi Saurabh,

    You can use $User.UITheme and $User.UIThemeDisplayed global variable to find the current user experience.
    These global merge fields identify the Salesforce look and feel a user sees on a given Web page.
    The difference between the two variables is that $User.UITheme returns the look and feel the user is supposed to see, while$User.UIThemeDisplayed returns the look and feel the user actually sees. For example, a user may have the preference and permissions to see the Lightning Experience look and feel, but if they are using a browser that doesn’t support that look and feel, for example, older versions of Internet Explorer, $User.UIThemeDisplayed returns a different value.

  • Avnish Yadav

    Member
    September 29, 2018 at 9:02 pm

    Hello,

    VF Pages embedded in a Page Layout come over as iframes, so the solution is to write a VF Page using only <apex:detail .../> to bring over the Page Layout and then have JavaScript (via jQuery) resize all the iframes.

    Thanks.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos