Skip to content

Instantly share code, notes, and snippets.

@bethbrains
Created March 4, 2017 06:09
Show Gist options
  • Select an option

  • Save bethbrains/e5772fd0f15cae8da5578dab708bfd05 to your computer and use it in GitHub Desktop.

Select an option

Save bethbrains/e5772fd0f15cae8da5578dab708bfd05 to your computer and use it in GitHub Desktop.

Revisions

  1. bethbrains created this gist Mar 4, 2017.
    20 changes: 20 additions & 0 deletions Dynamic Filtered Report Link
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    HYPERLINK(

    /* If they're in Lightning */
    IF($User.UIThemeDisplayed="Theme4d",

    /* Use Lightning syntax, optimized to avoid full page reload */
    "#/sObject/00OE0000003BLQi/view?fv0=",

    /* Otherwise use Classic syntax */
    "/00OE0000003BLQi?pv0=")

    /* Append the Account ID */
    &Id,

    /* Specify the link text */
    "Report Link",

    /* Keep it in the same browser tab to avoid full page reload */
    "_self"
    )