Skip to content

Instantly share code, notes, and snippets.

rustamtm / servicenow_restmessagev2_response_as_attachment.js
Created November 7, 2019 23:27 — forked from jnerius/servicenow_restmessagev2_response_as_attachment.js
Saving a RESTMessageV2 response as an attachment and getting the attachment's sys_id #ServiceNowSnippet
View servicenow_restmessagev2_response_as_attachment.js
// This is where we'll save the attachment
var tablename = 'incident';
var recordSysId = '8d6353eac0a8016400d8a125ca14fc1f';
var filename = 'snlogo.png';
// Let's download the ServiceNow Logo
var logoUrl = '';
var request = new sn_ws.RESTMessageV2();