Make Assignment read only based on the form selected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2024 04:02 AM
Hi
Want to make the Assignment group read only when a catalog item selected and for admin it should be editable
can anyone help me with this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2024 02:59 AM
Any help expert @Sandeep Rajput
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2024 04:49 AM
Thanks for tagging. Shared by inputs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2024 04:53 AM
Hi , @DSV22 , @Sandeep Rajput @Dr Atul G- LNG ,
Please Check my Solution , It is Working , I have Tested In my PDI
Thanks Regards ,
Badrinarayan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2024 10:28 PM
Hi @DSV22 Create a Write ACL on a table and use below script
Type: Record
Operation: write
Table: Your table
- Script Condition below
(current.catalog_item_field != ' ' && gs.hasRole('admin'))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2024 03:31 AM
If you want to make the Assignment group variable read only on the Record Producer request form, then try an onLoad Catalog Client Script:
function onLoad() {
if (!g_user.hasRole('admin')) {
g_form.setReadOnly('assignment_group', true);
}
}
If you want to make the Assignment group field on the ensuing incident record read only, but only if the incident was created via (a certain) Record Producer, then make sure the Record Producer is populating a field on the incident record that is unique - otherwise unused, or contains a unique value. For example, in the Record Producer script have something like
current.contact_type = 'self-service';
If you either don't use the Channel field normally, or no one or no process would ever otherwise populate it with this value when creating an incident outside of this Record Producer. Then you can create an ACL or Catalog Client Script to only allow users with the admin role to update the Assignment group field on these incident records.