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

Help with a button code

Need help with a button code .I have a custom object and  I need a list view button where user clicks the button and it should be able to pull the records based on the below criteria.
if the two fields are same like there is number field and a picklist field. For ex if there are three duplicate records with 1234 as number and picklist value as  test dupes then i need to update a checkbox field as true on those three records.

Any help is appreciated.


The best way to accomplish your requirement of showing checkboxes and selecting or deselecting those based on criteria would be with the use of Wrapper class. Please review more information on wrapper class at the link .

To run the apex on button click you need to use controllers as explained in the link below