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
enossirenossir 

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 window.open('/00O140000091FlJ?pv0={!Account.Id}'); is ran
So far I have only seen this option online: http://succeedwithsalesforce.com/multi-select-and-mass-update-records-in-lightning-list-views-using-flows-visualforce-and-a-list-button/
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 window.open('/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}?  
 
https://<domain>.force.com/lightning/r/report00O140000091FlJ/view?fv0={!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 lists....is 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

https://success.salesforce.com/ideaView?id=0873A0000003W5qQAE

Thanks,
Jay