Question

Mass Update Error - Cannot read properties

  • 22 August 2023
  • 3 replies
  • 140 views

Badge +2

Hello, I created a Client Script to implement the mass update of tasks. The code is writing below:

var teamID = getControlValue('task''team_id');

openWCMassUpdatePopUp();

while(1){
    // read-only field
    setControlEnabled('custom_input_xml''task__team_id'false);
    setControlValue('custom_input_xml''task__team_id', teamID);
    refreshScreen();
}

The code permits copy the team that I selected in the Task Screen to the team_id of the mass update and set the field as read-only. This way, I can change other fields in the tasks, except the team_id.

In the UI Designer, I configured the mass update in the following way:

The problem is that every time I open the mass update pop-up, this error appears:

Does anyone know how to solve this problem?

Thanks!


3 replies

Userlevel 6
Badge +26

Hi @AccCatOli 

What is custom_input_xml? 

Is there a physical table named custom_input_xml?

Is there a correlating custom metadata related to that table?

Cheers!

Badge +2

Hi @Shneor Cheshin,

Thanks for your answer.

The custom_input_xml can be seen in the view information of the fields presented in the mass update pop up.

 

 

Actually, this cannot be found in the FSM Metadata and it is not created in Custom Metadata.

Through a client script, it allows me to change the behavior of these fields, to be read only or not according to the business requirement. 

 

Best Regards,

Cátia Oliveira

 

Userlevel 6
Badge +26

Hi @AccCatOli 

You are triggering the script on the click event. The script will run on the current screen and not the mass update one.

As far as I know, the mass update screen is hard-coded. We can only add/remove fields from that screen. We cannot configure the screen or add client scripts to it.

You might consider creating a custom screen (solution) and configuring it as you wish.

Cheers!

Reply