- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2022 02:22 AM
UI Policies-Make field read only in review state
Hi,
I am writing a script for making the fields read only for a particular state(Review). I want the member of a specific group(member of IT_GRC(sys_id+76c540dbdb8cd090c7d99c18db961941)) only should be able to edit the form, what should I put in the script!!
function onCondition() {
var currentUser = g_user.userID; //stores the logged in user in currentUser
if (currentUser !=What shoul I put here?) {
var fields = g_form.getEditableFields();
for (var x = 0; x < fields.length; x++) {
g_form.setReadOnly(fields[x], true);
}
}
}
If any other changes required in the script, please let me know
Regards,
Kajal
Solved! Go to Solution.
- Labels:
-
Policy and Compliance Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2022 03:25 AM
Hi Kajal,
It is happening due to OOB UI policy with short description - "PE Reason read only and mandatory condition". You can update it accordingly.
Let me know in case of any queries.
If you think my response is helpful for you? If yes, mark it as correct answer and close the loop so that it would help future readers as well.
Regards,
Deepankar Mathur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2022 04:29 AM
Hi Deepankar,
I tried what you suggested, but the fields are not editable to member of IT GRC in REVIEW state.
Regards,
Kajal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2022 05:12 AM
Hi Kajal,
It seems you already have an ACL defined on the field in review state hence client script won't work there, you would need to look for that ACL which is making the fields read only and make update there. Hence allowing GRC team to update record.
Regards,
Deepankar Mathur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 11:18 PM
Hi Deepankar,
The filed "Justification " is not editable, I have tried altering the ACL, attaching SS of the same. Could you please tell me what am I missing here.
Please note, there are total of 3 ACL for justification, 2 of which is out of the box and the above one is customized. I have the snc_internal as well as the sn_compliance.manager role and still not able to edit the field in REVIEW state.
Adding the screenshots of out of the box ACL for justification field.
-------------------------------------------
Regards,
kajal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2022 03:25 AM
Hi Kajal,
It is happening due to OOB UI policy with short description - "PE Reason read only and mandatory condition". You can update it accordingly.
Let me know in case of any queries.
If you think my response is helpful for you? If yes, mark it as correct answer and close the loop so that it would help future readers as well.
Regards,
Deepankar Mathur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2022 05:29 AM
Hi Deepankar,
I made changes in UI policy that you mentioned, in condition I added Review state along with New and Analyze State.
When I did that, the output was as expected for REVIEW state, but It became read only for the requester in the New state
Adding the screenshot of the UI policy, coz you please suggest what could be the reason for the same
Marking your answer correct, thanks for the help
Regards,
Kajal