- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2016 06:22 AM
Hi All,
I have a doubt,
I have created a ACL that allows only admin users to write access Assigned to field for which i have created a simple ACL.
But now
I want that if the state of the incident in incident form is only resolved or any state as i want , that should not allow the write access , for any other state it should allow users to edit the field.
I have given under condtion that state is closed. but i see that for any state no maater what the ACL only works good for whether user is admin or not.. the condition seems to have no affect.
Is there any scripting that can be done.. if possible with an example would be very helpful
Thanks,
Abhinab
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2016 06:33 AM
The ACL only gets evaluated server side, so if the state field changes you would have to save the form before the ACL reevaluates itself. You could use a combination of ACL and ui policy.
If you're ACL isn't working could you post a screenshot?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2016 07:56 AM
Abhinab,
If you want this to be reflected as soon as the user changes the state, you will have to create a UI policy too. Because, as Brad mentioned, ACL is evaluated on server side.
Create a UI policy and put in conditions state is resolved
check the onLoad check-box, reverse if false check-box, Run scripts check-box
Scripts:
Execute if true:
function onCondition() {
if(!g_user.hasRole('admin')){
g_form.setReadOnly('assigned_to',true);
}
}
Execute if false:
function onCondition() {
g_form.setReadOnly('assigned_to',false);
}
Thanks,
Abhinay
Please mark Helpful, Like, or Correct depending on the impact of the response