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
dboonepesdboonepes 

UI for many-to-many relationship

I have created a join object for Cases and Asset for a many-to-many relationship between these objects. I would like to create a process for adding assets to cases that would be simpler and easier than the default in SF. The user exerience I have in mind is this... Click on button on the Asset related list in the Case layout. A window pops up listing the assets related to the account related to the case. The user check boxes next to the appropriate assets, clicks a button, the appropriate case asset join records are created and the window closes.

 

I am struggling with how to create the checkboxes next to the list of assets and how to pass that information to the Apex class I will need to build. Any suggestions or thoughts?

kaforcekaforce

Hello :)

 

One way of accomplishing this is to create a wrapper class (boolean,object) and only pull in the records that are marked as "true" by the selected checkbox. Another way would be javascript, but I would not recommend this route. good luck!