I understand how to enable the checkboxes on related list items; what I'm unclear of is how to determine in an Apex controller which items were checked. Inspecting the HTTP request made to the Apex page upon clicking the associated button on the related list shows that the IDs of selected items are sent in the POST
parameter ids
(repeated once for each ID), but I don't know how to use those IDs in the controller: PageReference.getParameters()
only yields one ID.
I tried modifying my constructor to accept a StandardSetController, but the list returned by StandardSetController.getSelected()
is empty. Am I doing something tragically wrong here?