How can I create an attachment from script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2017 06:28 AM
Does SN offer any API to create an attachment? I've used the following:
var gsa = new GlideSysAttachment(); var attachmentId = sa.write(gr, "fileName.txt", 'text/plain', "some data");
This works fine for creating text files. It doesn't work when trying to create a pdf, doc or docx file. Is there a way to do so?
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2018 01:39 AM
Hi Ashutosh,
my requirement was to add the single pdf document to different records.please give me any idea on that

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2018 01:53 AM
HI,
You have that pdf with you? and you only have to add it to records?
Thanks,,
Ashutosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2018 02:15 AM
I have PDF.this document how to add to the bulk of records(through Background/SJ scripts).Please replay me ASAP

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2018 02:57 AM
HI,
How many records you have?
Thanks,
Ashutosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2018 04:27 AM
I have 100 records