- 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-17-2017 11:37 AM
Can you tell me what's the difference between my script and yours? I can see the code is different but why is mines duplicating?
(function executeRule(current, previous /*null when async*/) {
var ritm = new GlideRecord('sc_req_item');
if (ritm.get(current.request_item)) {
ritm.work_notes = current.work_notes.getJournalEntry(-1);
ritm.update();
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2017 11:41 AM
If you're still seeing a duplication, then you should check other business rules on the sc_req_item table where you might be doing a current.update() in the script. It might be that the duplication comes from another business rule.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2017 11:44 AM
The script you gave me and the snap shot worked. It stopped the duplication. I was just making sure something in my script wasn't causing it.
Thanks again Kristen!!!
