Custom Field Renderers & Mass Updates in tables...

  • 2
  • Question
  • Updated 5 years ago
  • Answered
How do custom field renderers affect mass actions in tables? 
We have one conditionally rendering fields as read-only in a table, but when you go to run a mass update, the field is set as read-only, regardless of which records you have selected.

From what I can tell, it appears it's checking the condition for only one of the records & applying that to the renderer.  Can anyone shed more light on how custom field renderers interact with mass actions in tables?

Photo of Pat Hicks

Pat Hicks

  • 898 Points 500 badge 2x thumb

Posted 5 years ago

  • 2
Photo of Zach McElrath

Zach McElrath, Employee

  • 53,128 Points 50k badge 2x thumb
Mass Update only lets you edit fields that are NOT marked as "Read Only" from the Page Composer.

Mass Update will run your Custom Field Renderers, but in "context" of a generic row that, in general, does not have any field values pre-populated. 

Currently the best approach for these circumstances is to run slightly different code logic in case your field renderer is being used by mass-update. 

One way you can check whether your field renderer is being run by Mass Update is this:

var inMassUpdateContext = !;
if (inMassUpdateContext) {
    // Do something