Why is the cmdb_ci field still editable when it should not be?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I am trying to troubleshoot why the cmdb_ci field is still editable after I apply "Run If False" code in a UI Policy.
Here is my Run if True code:
function onCondition() {
if (g_user.hasRole('usb_unauth_change_manager') || g_user.hasRole('change_manager')) {
g_form.setReadOnly('cmdb_ci', false);
g_form.setReadOnly('short_description', false);
//alert("Andrew Wuz Here 1");
} else {
g_form.setReadOnly('cmdb_ci', true);
g_form.setReadOnly('short_description', true);
//alert("Andrew Wuz Here 2");
}
}Here is my run if false code:
function onCondition() {
if (g_user.hasRole('usb_unauth_change_manager') || g_user.hasRole('change_manager')) {
g_form.setReadOnly('cmdb_ci', true);
g_form.setReadOnly('short_description', true);
alert("Andrew Wuz Here 3");
} else {
g_form.setReadOnly('cmdb_ci', false);
g_form.setReadOnly('short_description', false);
//alert("Andrew Wuz Here 4");
}
}
The alert dialog for "Andrew Wuz Here 3" appears fine. What is overriding my readonly lines?
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
The points from my original reply are still valid - you likely have a Data Policy or Client Script on the same table affecting this field.
