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 07:09 AM
is the incident create ?
are you able to get the sys_id of the incident after insert (); ? did you log it ?
☑️ 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 08:12 AM
Yes incident is getting created and I used gs. log(create_incident) and I see sys_id of new incident is showing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2024 08:16 AM
This thread is not helpful as Record action utility is used to create incident
But I have used script action utility to create incident