Inbound SOAP/Base64 attachments stopped working
Workaround
function saveAttachment(record, filename, content_type, data) {
var id;
if (typeof filename === 'undefined') {
x_snd_eb.ws_console.warn('Ignoring attachment with missing filename attribute.');
id = 'x-attachment-error-missing-filename';
} else if (!filename) {
x_snd_eb.ws_console.warn('Ignoring attachment with empty filename attribute.');
id = 'x-attachment-error-filename-is-empty';
} else {
// use x_snd_eb scope to force using the scoped version of GSA
id = new x_snd_eb.GlideSysAttachment().writeBase64(record, filename, content_type, data);
x_snd_eb.ws_console.trace('Extracted attachment [' + filename + ':' + content_type + ']' +
' to record [' + id + ']' +
' for [' + record.getTableName() + ':' + record.sys_id + ']');
}
// return the original tag with the sys_id of the new attachment record
// so we can pick it up in processing later on
return '<x-attachment-data sys_id="' + id + '" />';
}Binary Base64
Full example for Extract attachments script
Extract attachments scriptLast updated
Was this helpful?
