Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Earlier Attachments from Interaction are not getting copied to Incident or RITM , however then I had created an BR which run after insert in Interaction_related_record table which works fine for RITM however still not working for Incident.
(function executeRule(current, previous /*null when async*/) {
// Add your code here
if (current.document_table == 'incident')
{
var inc = new GlideRecord('incident');
inc.addQuery('sys_id',current.document_id);
gs.info('Document Table: ' + current.document_id);
inc.query();
if (inc.next())
{
GlideSysAttachment.copy('interaction', current.interaction, 'incident', inc.sys_id);
}
}
else if (current.document_table == 'sc_request'){
var ritm = new GlideRecord('sc_req_item');
ritm.addQuery('request',current.document_id);
ritm.query();
if (ritm.next()){
GlideSysAttachment.copy('interaction', current.interaction, 'sc_req_item', ritm.sys_id);
}
}
})(current, previous);
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
I just now made few changes in your script user After Insert & update
(function executeRule(current, previous) {
if (current.interaction && current.task)
{
var att = new GlideSysAttachment();
att.copy('interaction', current.interaction, 'incident', current.task);
}
})(current, previous);
Then It Worked , thanks for you Support
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
I just now made few changes in your script user After Insert & update
(function executeRule(current, previous) {
if (current.interaction && current.task)
{
var att = new GlideSysAttachment();
att.copy('interaction', current.interaction, 'incident', current.task);
}
})(current, previous);
Then It Worked , thanks for you Support