client script g_form.setReadOnly() no longer works in Sandiego

xiaix
Tera Guru

I have a Client Script on the sc_task table where I have the following code:

 

var variable_map_items = $("variable_map").querySelectorAll("item");
for (i = 0; i < variable_map_items.length; i++) {
	variable = variable_map_items[i].getAttribute("qname");
	g_form.setReadOnly("variables."+ variable, false);
}

 

I would like to mention that in my ROME instance (and earlier), the above code works great.

However, our DEV instance just upgraded to Sandiego and it is no longer working.

 

What changed in Sandiego where you can't do this anymore?

 

1 ACCEPTED SOLUTION

xiaix
Tera Guru

So, here's the real answer, which isn't mentioned anywhere in the docs!  Grrrrr!

San Diego - Take actions to keep "write roles" on Catalog Variables working 

 

Basically, I needed to insert a sys_property called glide.sc.evaluate.variables.write.access and set the value to false

Once I did that, everything worked like a charm.

View solution in original post

9 REPLIES 9

Mike_R
Kilo Patron
Kilo Patron

If you are trying to make all variables read only, use this instead. no need to loop through all variables.

 

   g_form.setVariablesReadOnly(true);

 

No, that's not what I'm trying to do.... i know it looks like it, but it's not.  Even so, g_form.setVariablesReadOnly() isn't working in Sandiego either 😞

Are there more lines of code in you script beside what you provided above? maybe something else is failing.

I just tested your code provided above and it's working fine for me.

So you're saying that on the sc_task table you wrote a Client Script that is working with my above pasted code where you are setting the readOnly to false on the VARIABLES?