function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Classic to lightning: how did you replace related list JS buttons?

For example we have a related list button in lightning does the following
  1.  select the records within the related list that you want to update (Display Checkboxes (for Multi-Record Selection)) is enabled.
  2. click the button
  3. Custom JS is ran, part of it calls on apex global methods, but at the end of the day the selected records on that related list are 'updated'. OR a simple'/00O140000091FlJ?pv0={!Account.Id}'); is ran
So far I have only seen this option online:
Flow: A screen flow that would accept user’s input and then update the selected records with the new owner

Visualforce Page: The flow would be embedded inside this Visualforce page and the page performs the primary job of passing over the selected records in the list view into a Flow SObject collection variable.

Custom List Button: This button will reference the Visualforce page and will be placed on the List view

Now if that works, couldnt i just create a VF page and then apex code instead of a flow (i hate flow builder i'd rather code). Heck, since i'm running VF coulnd't i just and call on global methods, keeping some of the if/else structure of the original JS related list button.

What's everyone's experience with migrating list view buttons from classic-->lightning.

In regards to a'/00O140000091FlJ?pv0={!Account.Id}');  Could that be recreated in a standard custom link button? Would something like below work or would it not pick up the {!Account.Id}?  

I'd like to keep a button on the related list itself instead of just jamming loads of related list buttons into the lightning quick action section (the fact that you cant have lightning quick actions on related painfully bad) it makes it easy for the users, they go to the related record, they click the button, instead of trying to figure out what the buttons do from the lightning quick action section........

Has anyone been able to ghetto rig a custom button --> VF page/link ---> lightning component?
Jayanth ThathapudiJayanth Thathapudi
Hi Enossir,

Please upvote for URL hacking in Lightning