Need at add attachment to the incident in Virtual Agent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2024 05:53 AM
Hello,
I have created VA topic to create an Incident, now I need to add File Picker to the flow and attach that attachment to the incident to be created.
Script to create incident:
(function execute() {
var incGr = new GlideRecord("incident");
incGr.initialize();
incGr.setValue("caller_id", vaInputs.callerid);
incGr.setValue("short_description", vaInputs.short_description);
incGr.setValue("contact_type", "virtual_agent");
incGr.setValue("category", vaInputs.category);
incGr.setValue("subcategory", vaInputs.subcategory);
create_incident = incGr.insert();
vaVars.inc_sys_id2 = create_incident;
})()
Script to add attachment to inc:
(function execute() {
vaSystem.attachToRecord(vaInputs.attachments.getValue(), incident, vaVars.inc_sys_id2);
})()
Previously incident is created. but now even incident is not creating.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2024 05:59 AM
try :
(function execute() {
var incGr = new GlideRecord("incident");
incGr.initialize();
incGr.setValue("caller_id", vaInputs.callerid);
incGr.setValue("short_description", vaInputs.short_description);
incGr.setValue("contact_type", "virtual_agent");
incGr.setValue("category", vaInputs.category);
incGr.setValue("subcategory", vaInputs.subcategory);
var create_incident = incGr.insert();
vaVars.inc_sys_id2 = create_incident;
})()
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2024 06:09 AM
Thanks @Sohail Khilji for the response,
I main query is to add the attachment to the incident after created.
If I remove the Script to add attachment to inc, then incident is creating.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2024 06:28 AM
Hi @Admin7267 ,
For arrachement > here is the solution :
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2024 06:39 AM
I followed the same thread to add the attachment, but it's not working.