You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Service Request Attachment in Groovy

Received Response
17
Views
2
Comments

Summary:

Read Service Request Attachment in Groovy and Encode to Base64

Content (please ensure you mask any confidential information):

We have image attachment in Service Request. We want to send it to external system. External system accepts only Base 64 encoding. How can we achieve this? We have tried multiple methods but they are not working. See below.

Version (include the version you are using, if applicable):

23C

Code Snippet (add any code snippets that support your topic, if applicable):

Different functions we tried:


while(Attachment.hasNext()) {

 def singleAttchment=Attachment.next();

 def content=singleAttchment.FileContents;

 //def content2=content.getBytes(1l, (int)content.length());

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!