- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 08:24 AM
In my requirement, service management is the name of catalog item. If the request is closed complete the form should be read only. I tried to use UI policies but, I can't done for service management catalog item alone.
So, Please suggest how to make sc_request table filed form should be ready only for service management catalog item.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 08:34 AM
Hi @Deepika43 ,
Did you check this video by Amit. Update conditions based on your requirements like catalog item name etc. https://www.servicenow.com/community/developer-articles/servicenow-use-case-make-all-fields-read-onl...
Regards,
Badal Khojare
Community Rising Star 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 08:34 AM
Hi @Deepika43 ,
Did you check this video by Amit. Update conditions based on your requirements like catalog item name etc. https://www.servicenow.com/community/developer-articles/servicenow-use-case-make-all-fields-read-onl...
Regards,
Badal Khojare
Community Rising Star 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 08:40 AM
Create a table.none read acl (here table is sc_request)
In condition add -state is closed complete
In Acl script add - answer =false;
If my answer solved your issue, please mark my answer as ✅Correct & 👍Helpful based on the Impact
Thanks,
Manjusha Bangale
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 08:43 AM
this read only should not affect for other catalog item. I need for 'service management' catalog item alone.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 09:05 AM
Hi @Deepika43 ,
Hope you are doing great.
To make the form for the "service management" catalog item read-only once the request is closed, follow these steps:
-
Create a Business Rule: In the
Advanced
tab, set the condition to trigger this rule when the request is closed. In the script, use GlideForm methods to set the form fields to read-only.(function executeRule(current, previous) { if (current.state == 7) { // Assuming 7 represents "Closed" state var form = current.getGlideForm(); form.setReadOnly(true); } })(current, previous);
-
Apply UI Policy:
- Navigate to
Service Catalog
>Catalog Definitions
. - Find your "service management" catalog item.
- Click on it, then go to the
Policies
related list. - Create a new UI Policy.
- Set the condition to apply when the request is in a closed state.
- In the UI Policy Actions, choose
Make Read-Only
for the form fields you want to lock.
- Navigate to
Regards,
Riya Verma