Scoped GlideSysAttachment.writeBase64() methode not available in global GlideSysAttachment

Shark0os17
Tera Contributor

Hi,

We have a process where it's necessary to create an attachment from a base64encoded string. To achieve this, we intended to utilize GlideSysAttachment.writeBase64(). However, this method is only available in scoped applications. The global GlideSysAttachment does not include this writeBase64 method.

I would like to know the reason/explanation behind this unavailability.

Creating a custom scoped application and housing the script there, which we would call from the global application, is a recommended approach?

Thank you.

1 REPLY 1

Sandeep Rajput
Tera Patron
Tera Patron

@Shark0os17 writeBase64 is only available for the scoped applications and not available for the Global scope. Since it is not available for Global scope, and if you still like to use this method then your best bet would be to create a script include in a scoped application and call that script include from the Global scope. If you are concerned about violating the scope of an existing application then simply create a new custom scoped application and create the script include in it. Similar approach was used by other users for this use case.

 

Hope this helps.