
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2018 01:33 PM
Greetings,
Relative newbie here with limited ServiceNow knowledge so please be gentle. 🙂
I have the following requirement:
I would like to grant the Change Manager role access to edit a field which has been tagged via UI Policy to be read only after the state of a Change Request moves from New to Assess.
Backgound:
We have a field called "Technical Approval" in our Change Request form. The purpose of this selection field is to allow the Change Coordinator to select users from the User table who will act as Technical Approvers on the Change Request.
The Approvers tab gets populated with the names from this Technical Approver list once specific Change Tasks are completed in the workflow. Once those Technical Approvers have completed their Approver items, the Change Manager then gets populated in the Approvers tab to Approve the Change.
So the flow is: QA change tasks are completed, Technical Approvers get populated in the Approvers tab which are then completed and then the CM Approver item gets populated in the Approver tab to approve the Change.
We only want the Change Coordinator to be able to edit this field when the Change is in a NEW state for audit reasons. As such there is a UI Policy which locks down the field as soon as the Change Request moves to Assess.
Problem
At times users do not add the correct tech approvers or miss them entirely etc. The Change Manager then has to deactivate the read only UI Policy, update the technical approvers field and reactivate the UI Policy. Pain in the butt.
Requested Solution:
I would like for the Change Manager role to be able to override the read only UI Policy so they can edit the field without having to log in as Admin and deactivate/reactivate the policy.
Does anyone have any thoughts on how to easily do this? I don't script, so I may be hooped here 🙂
Thanks in advance
Solved! Go to Solution.
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2018 02:11 PM
Hi adrianh,
As what i understood you want the field t be editable for users with Change Manager role.
In the Ui Policy just write a if condition to check if the user has that role or-else make the field read only.
This also can be done by client script also
function onLoad() {
if(g_user.hasRole('rolename')){
g_form.setReadOnly('fieldname', false);
}
Revert back with more queries if any
Mark the answer as Correct/Helpful based on its impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2018 02:11 PM
Hi adrianh,
As what i understood you want the field t be editable for users with Change Manager role.
In the Ui Policy just write a if condition to check if the user has that role or-else make the field read only.
This also can be done by client script also
function onLoad() {
if(g_user.hasRole('rolename')){
g_form.setReadOnly('fieldname', false);
}
Revert back with more queries if any
Mark the answer as Correct/Helpful based on its impact.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2018 02:15 PM
Thank you Abhishek,
I will poke around with this and see how it goes.
If I run into challenges, I will post back
Thanks for the help and quick response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2018 04:58 PM
Yes definitely try it out and I can help you solve this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2018 04:40 PM
Hi
were you able to resolve this??