We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

How to populate an attachment variable

suvro
Mega Sage

Hi,

I have a record producer, where I have an attachment variable.

From an onLoad client script I am getting a png file from external source through REST API in a base64 format

Now the question is how to populate this file to the attachment variable?

I have gone through the GlideSysAttachment APIs but that attaches the attachment to a table record. How to populate the attachment directly to the variable?

3 REPLIES 3

Ankur Bawiskar
Tera Patron

@suvro 

will the file be same always which you are fetching?

 

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

suvro
Mega Sage

No it wont be the same file

DharmarajB
Tera Contributor

Hi @suvro ,

 

We have a similar requirement. Can you let me know if you found any solution for the thread.

 

Thanks