- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2022 01:16 PM
Can anyone provide some insight on the proper script for the Business Rule that will allow Additional Comments created on the Request to automatically copy to the RITM? I tried using the following with no luck.
Create an after business rule on sc_request table
-When: after insert and update
-Conditions: Additional comments changes
-Script:
var gr= new GlideRecord("sc_req_item");
gr.get(current.getValue("request_item"));
gr.comments=current.comments.getJournalEntry(1);
gr.update();
Thanks,
AJ
Solved! Go to Solution.
- Labels:
-
Request Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2022 01:26 PM
Hello
var gr = new GlideRecord('sc_req_item'); gr.addQuery('request',current.sys_id);
gr.query(); while(gr.next())
{
gr.comments = current.comments;
gr.work_notes = current.work_notes;
gr.update();
}
Please mark answer correct/helpful based on impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2022 04:37 AM
I assume that based on the Filter Conditions the BR should run whenever Additional Comments change on the Req. Not sure how to verify based on inbound emailed comments.
Thanks,
AJ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2022 04:50 AM
try to process some inbound email and check if BR runs.
Ideally it should trigger when comments changes
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2022 04:54 AM
I checked the Email Log on the test email I sent for additional comments and their are no mentions of a Business Rule in the log of the specific email in question.
Thanks,
AJ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2022 05:09 AM
Ideally the BR should trigger when comments changes be it from UI or from inbound action
When inbound email is received did you verify comments got changed?
you can verify that by checking the history of the record and check the timing of inbound email
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2022 06:48 AM
Yes the Additional Comments were added to the Request when an email was sent/replied to the email associated with the open Request.
AJ