
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2022 08:17 AM
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?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2022 12:20 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2022 08:19 AM - edited 11-07-2022 08:19 AM
If you are trying to make all variables read only, use this instead. no need to loop through all variables.
g_form.setVariablesReadOnly(true);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2022 08:46 AM - edited 11-07-2022 08:47 AM
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 😞
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2022 09:01 AM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2022 09:08 AM - edited 11-07-2022 09:09 AM
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?