- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2016 07:56 AM
Hi,
I would like an attachment (word document) to be attached to each new record (in my request table) by default, as soon as the record gets created. How would I do this?
Right now I have to drag-and-drop the attachment onto each record.
Thanks!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2016 09:36 AM
Hi,
You can upload attachment in sys_attachment table and then create a before business rule on incident table to copy attachment from sys_attachment table to incident table with the help of GlideSysAttachment.copy
More info here Copy Attachments from Record to Record - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2016 12:58 PM
Hi Ahbinay,
I ran your script, but there seems to be a scoping issue (I'm using Geneva):
Create operation against 'sys_attachment' from scope 'x_prgm_red_team_te' has been refused due to the table's cross-scope access policy
What are my options for fixing this? It seems like all attachments in sys_attachment have global scope.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2016 01:16 PM
You will have to change Application access controls for the table. Go to sys_attachment table and right click on the list go to configure -> Table. In the application access check box the create and make sure it is accessible form all applications as shown in the below screenshot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2016 07:48 AM
Hi Abhinay, I just found out that this attaches an empty Word document to the record when it is inserted. I'm not sure why it's empty because the original document in the sys_attachments table is not. Thanks for the help.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2017 12:40 PM
Looks like you may also need to insert a record into the Attachment Documents table (sys_attachment_doc). I tried the above script and also got an empty word document. I just started working on this so I'll report back once I get it working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2017 12:13 PM
Hi Cameron,
Were you able to get the attachment to populate with data?
Regards,
RV.