Update variables on RITM went state updated to closed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2025 07:55 AM
Hi all
I could do with a some assistance in producing a script, be it a client or business rule, to update the variables on RITM ticket once the state has been updated to completed. This will be anonymize end user customer data. So ideally I would envision the process would be for the script look for any RITM record that has a specific short description and a state as closed to update the variables in the editor to a set of asterisk. Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2025 04:16 AM
Thanks for the script, I tried this in my instance but unfortunately it didn't produce the desired results, I'll continue to investigate if there are any conflicting scripts already setup in the environment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2025 04:26 AM
can you explain why you are not using onLoad client script on RITM and check the state and then make those variables readonly
Something like this
function onLoad() {
if (g_form.getValue('state') == 3) {
g_form.setReadonly('variables.variableName', true);
}
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2025 04:34 AM
Setting the variables to read only will only prevent from being altered in the instance rather than anonymising the data which could be deemed sensitive.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2025 04:44 AM
you can hide those variables if it contains sensitive data
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader