inbound action error : did not create or update table using current
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2023 07:57 AM
i am not using current but why is it requesting me to use it in my script below: i used this code in the background and it worked but now in a script inbound action it requires me to use current not sure where i can incorporate current
var attachment = new GlideSysAttachment();
var dataSource = 'sysid string';
var attachmentGR = new GlideRecord('sys_attachment');
attachmentGR.addQuery('table_sys_id', dataSource);
attachmentGR.query();
if (attachmentGR.next()) {
attachmentGR.deleteMultiple();
gs.info('Attachment deleted');
} else {
new GlideSysAttachment.copy('sys_email', sys_email.sys_id, 'sys_data_source', dataSource);
}
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2023 11:17 AM
Hi @ServNowDev
have you tried (deleteRecord istead deleteMultiple) this and also check if any other inbound action is running.> check email logs
var attachment = new GlideSysAttachment();
var dataSource = 'sysid string';
var attachmentGR = new GlideRecord('sys_attachment');
attachmentGR.addQuery('table_sys_id', dataSource);
attachmentGR.query();
if (attachmentGR.next()) {
attachmentGR.deleteRecord();
gs.info('Attachment deleted');
} else {
new GlideSysAttachment.copy('sys_email', sys_email.sys_id, 'sys_data_source', dataSource);
}
Accept and hit Helpful if it helps.
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025