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
Chris MarzellaChris Marzella 

Use a button to create a list

I have 2 custom objects. The first object has a large database of items (let's call this object cards for simplicity). The second object is where I want to group different combinations of "cards" into a "hand". I want to add a button in "cards" where I could go down the list view and for example select 2,5,10,Jack,Queen then click the button to add these to my "hand".

How can I do this as simplistic as possible?

Thanks in advance!
sandeep sankhlasandeep sankhla
Hi,

You can make use of inline VF page..you can create inline VF page which you can include in Hand's detail page....In this inlibe Vf page you can sho wall cards with checkboxes and then you can select cards which you want and then hit save....then these cards will be added to that hand where you are currently..

so by this way you can go to hand record where you want to add cards and from inline VF page youy can select cards and add them .

Thanks,
Sandeep
Chris MarzellaChris Marzella
Sounds like a solution. How would I go about implementation?
sandeep sankhlasandeep sankhla
Hi,
You can follow these steps :
1.Create a VF page which you will include as inline VF page in Hands records.
2. In controller you can queru all card records and by using wrapperclass you can bind the checkboxes with those records .
3. on click of save buton you can update the parentID as that Hand it for all those records

You can check blogs and google for help for wrappr class and checkbox binding and all these things..you will get easily

If I will have time, will share the sample code which you can refer for implementing this..

Thanks,
Sandeep
 
sandeep sankhlasandeep sankhla
Hey,

you can refer these below link for same need

https://www.minddigital.com/what-is-wrapper-class-and-how-to-use-it-in-salesforce/

http://blog.jeffdouglas.com/2009/01/13/apex-search-with-checkbox-results/

Above both link should help you to achieve these...

Please check and let me know if it helps..

Thanks,
Sandeep