Amit Gujarathi
Giga Sage
Options
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 04-27-2023 02:40 AM
Hi All,
I hope you're doing great.
- In my ServiceNow experience, I have encountered this scenario a few times, where we want to make all the fields on the form read-only on certain conditions or states.
- In general, the approach we follow is to create a UI policy and add a separate UI policy for each field.
- But with this approach, we have to first find all the fields which we want to make read-only and then we have to create a separate UI policy action for each, which I feel is a very tough job.
- Also if we are introducing a new field on the Servicenow form then we have to visit the UI policy and create a new UI policy action for the new field.
- To get rid of this problem, I came up with the solution using the ServiceNow client script which will help you to achieve the same problem statement with a shortcode and also provides flexibility so that if any field is introduced into the form in the future it will be taken care automatically.
So in this tutorial, we will look into a use case to make all the fields on the ServiceNow form using client script.
Topics:
- Problem statement
- Challenge with ServiceNow UI policy
- Introduction to ServiceNow client script
- Advantages of ServiceNow Client script for this use case
- Demo
Please be sure to bookmark this article as well as mark it as Helpful if you thought it was helpful.
Regards,
Amit Gujarathi
Labels: