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
Guillaume MorinGuillaume Morin 

Custom Button passing Related List selected checkbox entry to New Case

Hi,
I'm trying to see if there's is a way to use a related list custom button and pass along the related list entry checked (only 1) to create a new case. Looking all over, I can't seem to locate any specific example on how to do this.

Right now I can easily create a new case passing AccountID and ContactID details but I would also need to pass one of the related list entries (checked one). Simple using related list ID doesn't work.

In a perfect world I would also be able to place the custom button right beside the "Edit"/"Delete" list button but I don't believe this is possible.

I'm currently using URLFOR to pass along the info. If you think JS is needed, it would be fine, unfortunately APEX is not possible.

Thank you very much for your ideas

Guillaume
logontokartiklogontokartik
I am not completely aware of the requirement, but from what I understand, maybe you can build an interim visualforce page that will allow you to select one related list item, and then clicking next (or something) will take you to the new case page

So basically,
1. Create a new visualforce page/controller for parent object (as standard controller)
2. add a button on the detail of the parent object
3. clicking button will ask user to choose from related list items (you can use a radio or a select input)
4. after choosing user can click next or some button to create a new case.