- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2023 10:45 AM
Hello,
I had a requirement that "Requested for" and "Manager" field in tasks should be made editable.
I followed this https://docs.servicenow.com/bundle/utah-servicenow-platform/page/product/service-catalog-management/... to got the requested for and manager field editable.
When the requested for is changed, manager gets auto populated, which is good.
Now that the user can edit the managers and can be misused, the requirement changed to only getting the requested for editable and manager should be grayed out.
How can I achieve of just manager field getting grayed out.? Attced is the pic for reference.
-Thanks
Shree
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2023 05:54 PM
Hi @Shree Nag
It means there is another UI Policy or Client Script which is making it editable. You need to debug and find it out.
Or you can change the order of the UI Policy, set it to maximum like 2000. And if it doesn't work, create a client script to make the field read only.
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2023 11:07 AM
Hi @Shree Nag
Have you tried and UI Policy? Try creating an UI Policy on the form with conditions like the one below and save.
Requested for :: IS Not Empty
Then in UI Policy Action related list, click on new button and in the form opened, select the Manger field and make ready only check box true and save the form.
Now test your requirement.
Please mark my answer helpful and accept as a solution if it helped 👍✅
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2023 12:01 PM
Thank you Avanesh for quick reply.
This will be on task or incident table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2023 12:27 PM
Avanesh,
I was able to create the UI policy on task table, and the create a gray out policy for Manager field.
When tested, I fill the requested for field, the manager field grays for a millisecond and come back as editable field.
Could uou please throw some light on what may be wrong.
Attached is the Pic of the UI policy created.
Appreciate your help !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2023 05:54 PM
Hi @Shree Nag
It means there is another UI Policy or Client Script which is making it editable. You need to debug and find it out.
Or you can change the order of the UI Policy, set it to maximum like 2000. And if it doesn't work, create a client script to make the field read only.
Anvesh