Skip to main content

Hi 

 

We are currently in the middle of the migration from Classic to Lighting and have found an issue which it seems we cannot solve.

 

We have a lot of buttons which link to a report and filters accordingly with the Account Id.

 

Example on the Account Object:

For regular buttons on an object we use the furmula as following:

{!IF($User.UIThemeDisplayed="Theme2",

URLFOR("/00O2o000007PkkX", null, [pv3=Account.Id]),

URLFOR("/lightning/r/Report/00O3H000000HUZLUA4/view?queryScope=userFolders&fv3="+Account.Id))}

It does work for both Classic and Lightning also with the handover of the Account Id. But as soon as we add this formula to a related list button (Contacts related to account) it only works in classic. In Lightning the Account Id does not get added to the report filter at all. Obviously, we adapt the formula to get the account from contact - above is only the example from the account.

 

Is there a way to force the handover of the account Id on a related list button? Or did we completely miss something in the adaption of the button?

 

@* Salesforce Developers *

2 answers
  1. Apr 26, 2023, 3:08 PM

    Hi Mikey

     

    Thanks a lot for your response!

     

    You won't believe it, but the button on the related list was actually working. I think the issue I had was coming from the fact that I switched back and forth between classic and lightning within the same browser/session.

     

    As you can see below the filter gets set correctly when I use a different browser for each UI. So, it most definately has something to do with the cache of the browser when switching the UI.Hi Mikey Thanks a lot for your response! You won't believe it, but the button on the related list was actually working.2023-04-26_17-02-27.jpg

0/9000