- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-29-2022 05:46 AM
Hi,
I have following requirement:
When an email is sent from a new client template then the email content should be copied into work note of that incident record.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-29-2022 05:52 AM
Hi, Create After insert Business rule on sys_email table.
--> Add following condition - Target table is incident
--> Use below script to copy the content in the work note.
var rec = new GlideRecord(current.target_table);
rec.addQuery('sys_id', current.instance.toString());
rec.query();
if (rec.next()) {
rec.comments = '[code]'+current.body+'[/code]';
rec.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-29-2022 05:52 AM
Hi, Create After insert Business rule on sys_email table.
--> Add following condition - Target table is incident
--> Use below script to copy the content in the work note.
var rec = new GlideRecord(current.target_table);
rec.addQuery('sys_id', current.instance.toString());
rec.query();
if (rec.next()) {
rec.comments = '[code]'+current.body+'[/code]';
rec.update();
}