inbound action error
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2023 08:48 AM
Getting the following error below and not sure where its coming from :
Action : did not create or update sys_data_source using current
(function runAction( /*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) {
// Implement email action here
var email = email;
if (email.hasAttachments()) {
var attachments = email.getAttachments();
for (var i = 0; i < attachments.size(); i++) {
var attachment = attachments.get(i);
if (attachment.getFileName()) {
var dataSourceRecord = new GlideRecord('sys_data_source');
if (dataSourceRecord.get('unique_identifier', 'sys_id_ofmydatasource')) {
var attachmentRecord = new GlideSysAttachment();
attachmentRecord.write(dataSourceRecord, attachment.getFileName(), attachment.getContentStream());
gs.log('Attachment' + attachment.getFileName() + 'copied to data source' + dataSourceRecord.getUniqueValue());
}
}
}
}
})(current, event, email, logger, classifier);
0 REPLIES 0