- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2023 12:30 AM
Hi Experts
I want to make the fields (First name and second name) readonly, if assignment group is "Network" after I submit the request on the portal page.
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2023 12:58 AM
Hi @dhineshkumar,
If Assignment group = Network then First name and last name variables should be readonly on RITM ticket.
For above functionality, you can create UI policy on Requested Item table, Add the condition " Item is User Facade" and Assignment group is network.
Go to Script Tab and make the Run script checkbox true.
Add the below code in Execute if True script field:
g_form.setReadOnly("variables.first_name",true);
g_form.setReadOnly("variables.last_name",true);
Add the below code in Execute if False script field:
g_form.setReadOnly("variables.first_name",false);
g_form.setReadOnly("variables.last_name",false);
Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.
Thanks & Regards
Jyoti Jadhav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2023 12:45 AM
Hi @dhineshkumar ,
If you want to make fields readonly on requested item or catalog task than create a UI policy and select the checkbox "Applies on Requested Items" OR "Applies on Catalog Task" and deselect the other one "Applies on Catalog Item view".
Anand
ServiceNow Developer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2023 12:58 AM
Hi @dhineshkumar,
If Assignment group = Network then First name and last name variables should be readonly on RITM ticket.
For above functionality, you can create UI policy on Requested Item table, Add the condition " Item is User Facade" and Assignment group is network.
Go to Script Tab and make the Run script checkbox true.
Add the below code in Execute if True script field:
g_form.setReadOnly("variables.first_name",true);
g_form.setReadOnly("variables.last_name",true);
Add the below code in Execute if False script field:
g_form.setReadOnly("variables.first_name",false);
g_form.setReadOnly("variables.last_name",false);
Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.
Thanks & Regards
Jyoti Jadhav