- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2024 09:05 AM
Hello,
I've seen several posts with similar requests and am needing help, I am not a well-versed developer but we have a requirement to "link" the short descriptions between a RITM and SCTASK. Ideally, we would manually update and save the short description at the SCTASK level and want the RITM short description to update to reflect changes made on SCTASK short description. I understand that this is likely needing done as a business rule but I need help with the scripting part and what all needs to be done step by step. All other examples I have seen do not outline this specific request. The only condition I need this to update on is off a specific catalog request only (General Request), not all catalog items.
The reason we are needing to do this is based off end-user feedback that when they access ticket status via the Employee Service Center, they are only seeing the short description for the RITM and users are having a hard time finding which ticket is for what request. We have a small amount of catalog options currently and the majority are being submitted as "General Request". However, when the user checks status, the relevant details just show the REQ/RITM # and the short description for the RITM only but our techs solely work off the SCTASKs. Were thinking if we add a rule to update short description after tech updates at SCTASK level, it updates RITM so that user can identify summited tickets better. Any assistance is greatly appreciated!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2024 10:52 AM
When we say set the condition, we are referring to doing so in the When to run tab. Leave the Condition field blank on the Advanced tab. It will look like this:
Note: you may have to click "Show related fields" at the bottom of the left dropdown to be able to dot-walk into the Requested Item > Item field (to then choose General Request in the reference selector on the right).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2024 09:19 AM
Hi @ShawnaW ,
Create new after update business rule on sc_task table.
Condition dotwalk from Request Item to item is General Request and use below script.
(function executeRule(current, previous /*null when async*/) {
if (current.short_description != previous.short_description) {
var ritm = new GlideRecord('sc_req_item');
if (ritm.get(current.request_item)) {
ritm.short_description = current.short_description;
ritm.update();
}
}
})(current, previous);
Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2024 10:26 AM
Hello!
I have tried this script, and am getting the following error:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2024 10:52 AM
When we say set the condition, we are referring to doing so in the When to run tab. Leave the Condition field blank on the Advanced tab. It will look like this:
Note: you may have to click "Show related fields" at the bottom of the left dropdown to be able to dot-walk into the Requested Item > Item field (to then choose General Request in the reference selector on the right).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2024 11:44 AM
Giant THANK YOU for this! I was able to update things accordingly and test and can confirm this is exactly what we were needing to have completed. Thank you again for the initial, swift response and the additional clarification all in short time from my initial question. I appreciate you!