Attachment via Virtual agent
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2025 04:19 AM
Hi Team,
I trying to add attachment via VA, and its getting added to HR case activity stream but not added in top manage attachments. Why its happening?
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2025 04:24 AM
(function execute() {
var response = '';
var gr = new GlideRecord(vaVars.caseTable);
if (gr.get(vaVars.sysID)) {
var attachmentID = vaInputs.attachment ? vaInputs.attachment.getValue() : null;
if (attachmentID) {
if (gr.state == '24' || gr.state == '20') {
gr.state = '18'; // Reopen
}
gr.update();
vaSystem.attachToRecord(attachmentID, vaVars.caseTable, vaVars.sysID);
response = gs.getMessage("Your attachment has been added to the case.");
} else {
response = gs.getMessage("No attachment was provided.");
}
} else {
response = gs.getMessage("I couldn't find the record.");
}
return response;
})()
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2025 04:41 AM
are you accepting file from user in VA topic?
is this behaving the same for admin and non-admin?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2025 11:24 PM
Yes from VA topic and its happening same for admins