I need to add a document attached to my change and problem tickets when the user open new ticket
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2022 08:36 AM
Hi,
I need a document to be attached automatically to my change and problem request when user creates new change and problem tickets , so that user can download and fill the details in change and problem tickets.
thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2022 08:54 AM
Hi,
Please follow below steps:
1. Create new attachment record in sys_attachment table copy sys_id of record and use it in below script.
2. Create after insert business rule on both tables (change and problem) and use below script:
(function executeRule(current, previous /*null when async*/) {
GlideSysAttachment.copy('sys_attachment', <sys_id of attachment record>, 'problem', current.sys_id); // if BR is on problem
})(current, previous);
Thanks,
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2022 05:28 AM
Thanks
for the response
could you please help me am using the BR
(function executeRule(current, previous /*null when async*/) {
// Add your code here
GlideSysAttachment.copy('sys_attachment','40f93e16c0a801130137c1f1bf538539');
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2022 09:00 AM
You could try a Business Rule when the records are inserted to copy attachments using GlideSysAttachment.copy('from_table', 'from_record_sys_id', 'to_table', 'to_record_sys_id'). You should be able to house the attachment in any record by itself for this purpose. For example, an empty knowledge article for this specific use case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2022 05:28 AM
Thanks
for the response
could you please help me am using the BR
(function executeRule(current, previous /*null when async*/) {
// Add your code here
GlideSysAttachment.copy('sys_attachment','40f93e16c0a801130137c1f1bf538539');
})(current, previous);