- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 05:38 PM
I have a custom UI action to convert an INC to an SCTASK, I need to also include any attachments that were included on the INC. What am I missing in my script? Please help! See my script below.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 05:52 PM
Hi @Community Alums
You can use GlideSysAttachment.copy() method to copy attachments from incident to SC task.
add below lines of code to your script.
var tasksysID = taskRec.insert();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2025 06:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2025 12:33 PM
Pasting the complete code here:
var tasksysID = taskRec.insert();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 05:52 PM
Hi @Community Alums
You can use GlideSysAttachment.copy() method to copy attachments from incident to SC task.
add below lines of code to your script.
var tasksysID = taskRec.insert();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2025 06:08 AM
That worked! Thank you very much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2025 12:23 PM
Hello Swapna,
Please tell me where your added lines of script should go in my script that will allow the other lines to operate.
When I added your lines below the current.work_notes.setJournalEntry(setwrknotesinci); line, it included the INC attachment but did not include the notes that go in the SCTASK. Please instruct on how the below script should be lined.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2025 12:33 PM
Pasting the complete code here:
var tasksysID = taskRec.insert();