- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2018 04:53 AM
How to get attachment of incident record and convert that to base64 in scoped application.
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2018 05:30 AM
Hi Komal,
Following script should handle that: give the sysId in highlighted in bold
var gr = new GlideRecord('sys_attachment');
gr.addQuery('table_sys_id', '<incidentRecordSysId>');
gr.addQuery('table_name', 'incident');
gr.query();
if (gr.next()){
var sa = new GlideSysAttachment();
sa.getContent(gr);
var encodedData = sa.getContentBase64(gr);
gs.info("Base64 Encoded data is : "+encodedData);
}
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2023 08:36 PM
Can you create a new post and tag me there as this is an older thread?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader