- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2018 06:07 AM
I need either a Business rule or UI policy that will allow me to cause a field to become read only unless you have a specific role. I tried using a script from SN but so far I have not gotten it to work. The script was in a business role.
functiononLoad();{
var incidentState = g_form.getValue('incident_state');
if( incidentState =='6'|| incidentState =='7'){
g_form.setReadonly('priority',true);}}
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2018 07:18 AM
And also for write access to a particular role. create a write acl like below:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2018 06:13 AM
You can go with ACL.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2018 06:14 AM
Hi,
In your script above...it doesn't mention the role at all?
You also have a ; outside the function onLoad and that line is also annotated wrong.
It should look like:
function onLoad() {
//Type appropriate comment here, and begin script below
}
Enter your script in-between the {
}
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2018 06:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2018 07:16 AM