- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2017 04:56 AM
Can we write GlideSysAttachment.copy in business rule which does not runs on sys_attachment table?.. Or it can be only written on sys_attachment table?.
I have been trying to write it on sc_req_item table.. but it does not copy the attachment!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2017 05:11 AM
Here is an example, copying attachments from one incident record to another.
var sourceSysID = '9c573169c611228700193229fff72400';
var targetSysID = '9d385017c611228701d22104cc95c371';
var copyAtt = new GlideSysAttachment();
copyAtt.copy('incident',sourceSysID, 'incident',targetSysID);
If it was in a a br and I want to copy from lets say to current incident record to the record in the parent incident field it could look like this:
var copyAtt = new GlideSysAttachment();
copyAtt.copy('incident',current.getUniqueValue(), 'incident',current.getValue('parent_incident'));
And make this a async BR for performance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2022 12:27 PM
There is an out of the box action ''copy attachment'