- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2017 08:21 AM
Can someone help me out and see when someone updates the work notes and changes the state it updates the RITM 3 times in a row.
I open a ticket with SN and they told me it was a business rule I created called Work Notes to RITM. Can someone take a look at this business rule and see what's causing the work notes to update more than once on a RITM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2017 11:02 AM
Here is a snapshot of our business rule, running on sc_task to push worknotes to the RITM:
We have nothing set on the "Actions" tab. Hope that helps. I just tested this rule and it's working in our instance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2017 11:12 AM
I don't think you need to copy my code exactly. I would suggest these changes to yours:
Change "when" to after
Only check off "update"
Add filter condition: work notes changes
Then update your script to
var gr = new GlideRecord('sc_req_item');
gr.get(current.request_item);
gr.work_notes = current.work_notes;
gr.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2017 11:44 AM
Only check off "update" - does this means only update is check and not insert.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2017 11:51 AM
That's how ours is set up, since typically the creation of a ticket doesn't include comments or work notes, so you only need to run the business rule when the task is updated and the work notes change on that update.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2017 12:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2017 12:15 PM
You'll want to do the gliderecord query within the default function:\
(function executeRule(current, previous /*null when async*/) {
var gr = new GlideRecord('sc_req_item');
gr.get(current.request_item);
gr.work_notes = current.work_notes;
gr.update();
})(current, previous);
