copy sctask attachments - to rtim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2025 10:46 PM
Hi Team ,
can anyone please help me on this requiement .
Ony for particular catalog item ' Snow Support '
whenever in sctask we have attached any attachment . the same to should copy to ritm .
how to configure , can any one please help me .
@Ankur Bawiskar Please help me here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2025 10:55 PM
Hi @nameisnani ,
You can refer this solution :-
https://www.servicenow.com/community/itsm-forum/how-to-copy-attachment-from-sctask-to-ritm/m-p/70126...
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Chandan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2025 10:55 PM
Hi @nameisnani ,
Try below
Create Business rule :
Table - sc_task
When to Run - Before Update
Condition - item is Snow Support
Scripts -
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here{
GlideSysAttachment.copy('sc_task', current.getUniqueValue(), 'sc_req_item', current.request_item);
})(current, previous);
Thanks,
BK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2025 11:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2025 01:01 AM
can you try this
BR: after insert on sys_attachment
Condition: current.table_name == 'sc_task
var taskRec = new GlideRecord('sc_task');
taskRec.addQuery('sys_id', current.table_sys_id);
taskRec.query();
if(taskRec.next()){
var ritmRec = new GlideRecord('sc_req_item');
ritmRec.addQuery('sys_id',taskRec.request_item);
ritmRec.query();
if(ritmRec.next()){
GlideSysAttachment.copy('sc_task', current.table_sys_id, 'sc_req_item', ritmRec.sys_id);
}
}