Mass Update Table Records

  • 1
  • Question
  • Updated 6 years ago
Archived and Closed

This conversation is no longer open for comments or replies and is no longer visible to community members. The community moderator provided the following reason for archiving: Old Questions.

I have an object called work_order__c and a related object called hardware__c. Harware__c is an inventory object that shows hardware items and their status (in, out, damaged). On my work order detail page, I have a tab with a table in it that shows the records from hardware__c that are currently assigned to the work_order__c record being viewed. I created a pop up action button that brings up a screen with a table on it that shows the records in hardware__c that are available to be assigned to the current work_order__c record. There is a lookup field on hardware__c that links the work order to the hardware item.

Is there a way to create a button on the pop up table that allows the user to choose multiple hardware__c records from this pop up table and then update the lookup field in hardware__c with the ID of current work order? It would also be great if the pop up window was closed at the same time as pressing this button. I'm assuming I would need a custom snippet, but I hope it's fairly easy to do.
Photo of Colby


  • 614 Points 500 badge 2x thumb

Posted 6 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,828 Points 20k badge 2x thumb
I'm not completely sure this will be your answer - but you should check out the Tutorial Anna wrote about Mass Creating Records:

I was able to work through it.
Photo of Glenn Elliott

Glenn Elliott, Champion

  • 7,768 Points 5k badge 2x thumb
I agree with Rob. I had a similar use case and I used Anna's tutorial. It took me a little bit, but it worked beautifully in the end.
Photo of Colby


  • 614 Points 500 badge 2x thumb
Alrighty, I've been playing with the tutorial for awhile now and I'm not sure it quite fits.

From my pop up, I'd like the user to be able to select from a table of queried records from harware__c. Then, the work_order__c field within the selected hardware_c record(s) gets updated with the ID of the work_order__c record from the detail page they are currently viewing. I could see where the tutorial would apply if I wanted to update the work_order__c field on all of the related hardware__c records, but the key is to let the user search for hardware__c records that are currently unassigned to a work_order__c record and select specific hardware__c.

This conversation is no longer open for comments or replies.