Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

VA: How to update affected user in create incident VA topic?

akarshagnihotri
Tera Contributor

I'm using VA create incident oob topic block to create incident, it working fine, but when I'm checking in incidents for those created incident it's showing affected user as blank, how to update that?

2 REPLIES 2

AJ-TechTrek
Giga Sage
Giga Sage

Hi @akarshagnihotri ,

 

Its depends how you are using the mapping this, Affected user is nothing but its a use who is affecting due to that in that incident, you can use the script to populate the affected user or map the created user can be the affected user.

 

Please appreciate the efforts of community contributors by marking appropriate response as Mark my Answer Helpful or Accept Solution this may help other community users to follow correct solution in future.

 

Thanks

AJ

Linkedin Profile:- https://www.linkedin.com/in/ajay-kumar-66a91385/

ServiceNow Community Rising Star 2024

Hi Ajay,

 

I'm using below script to create incident. could you please update in this same script so that it will update affected user to the person who is using Virtual Agent at that time.

 

(function execute() {
var incident = new GlideRecord('incident');
incident.initialize();
incident.caller_id = vaInputs.caller;
incident.sys_created_by = vaInputs.user;
incident.short_description = vaInputs.short_description;
incident.assignment_group = vaInputs.assigment_group;
incident.cmdb_ci = vaInputs.cmdb_ci;
incident.urgency = vaInputs.urgency;
incident.impact = vaInputs.impact;
incident.contact_type = 'virtual_agent';
incident.comments = vaInputs.comments;
incident.incident_state = vaInputs.state;
//Save this incident as a variable to use to display it
vaVars.inc_sysid = incident.insert();
//Link this incident to the Interaction
vaSystem.attachRecordToConversation('incident',vaVars.inc_sysid);
 
})()