
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2022 04:13 AM
Hi there,
I have this requirement which says if someone updates a SC Task on the RITM related list for the SC Tasks, it needs to set one of the variables to read only. I already have a client to set this variable read only on load, however I need to set it when the user changes for example, the SC Task state to Close complete. What is your advise for this?
I was trying to reload the RITM form from the list update of the task, but it didn’t worked.
Best Regards
Solved! Go to Solution.
- Labels:
-
Now Platform App Engine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2022 05:34 AM
Hi,
After reading your further comments, what I understood is, you are struggling to reload form when someone updates field in SCTASK related list on RITM form so I found below solution for you.
You can write onCellEdit client script on catalog task form to reload RITM form whenever user updates something in SCTASK related list.
Please find script and details below (I have written client script for assignment group, you can change based on your requirement)
Let me know if you have any further queries.
Please mark this as Correct or Helpful if it helps.
Thanks and Regards,
Abhijit
Community Rising Star 2022
Regards,
Abhijit
ServiceNow MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2022 04:18 AM
Can you please elaborate a little more and what have you done in terms of script. I am not getting clarity on the readonly part.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2022 04:40 AM
Hi Sonali,
Yes I can.
So I have a requirement to set read-only of a variable in the RITM form if a task changes, eg the state to close complete. And that part is complete, I have a client script working onLoad in RITM that checks if that task is already complete, and if it is, the client sets the variable to read-only. The problem is that if the user updates the task state in the related list, and I need to implement a way that if the user updates the task state in the related list, the variable is set to read-only without the user need to reload the page. Something like, the user updates the state of the task, and it triggers a page reload automatically to run the onLoad client.
Best Regards

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2022 05:01 AM
Hi,
You cannot make RITM field as read only while changing the state value of related Task from the list view.
As a workaround you can restrict the user from changing the field values from the list view on Task.
Regards,
Sourabh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2022 05:34 AM
Hi,
After reading your further comments, what I understood is, you are struggling to reload form when someone updates field in SCTASK related list on RITM form so I found below solution for you.
You can write onCellEdit client script on catalog task form to reload RITM form whenever user updates something in SCTASK related list.
Please find script and details below (I have written client script for assignment group, you can change based on your requirement)
Let me know if you have any further queries.
Please mark this as Correct or Helpful if it helps.
Thanks and Regards,
Abhijit
Community Rising Star 2022
Regards,
Abhijit
ServiceNow MVP