How to use/replace GlideSysAttachment for scoped app?

aklimenko
Mega Expert

We use GlideSysAttachment in these cases. Is it supported in scoped app or how can we rewrite it?

1. GlideSysAttachment.copy() to copy an attachment from one object to another

2. .getBytes() to get binary stream to be later sent to external server

13 REPLIES 13

ptr1
Kilo Contributor

Did this ever make it into a release?


I am working on Build tag: glide-fuji-12-23-2014__patch10-10-21-2015


I and having issues with GlideSysAttachment.copy.


Hi pavan,



I am trying to use GlideSysAttachment.copy for a scoped application,


Is this thing fixed in Geneva ??


Hi Priyanka



you may fiind this article helpful SN Pro Tips — Understanding Attachments in ServiceNow


Was this defect ever fixed? GlideSysAttachments.copy() is still not working in the Istanbul Patch 9 release for scoped applications. I added the code John Roberts provided above to my application and updated the cross scope privileges for sys_attachment and sys_attachment_doc to get the functionality into my application.



If ServiceNow is not planning on fixing this functionality, then it should be removed from the API documentation for scoped application on developer site completely or put some note on the site that it is not working. I spent hours trying to figure out why it would not work until I stumbled across this post.