We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Create Case from Virtual Agent

sreeshsurendran
Tera Guru

Hi all,

 

I'm trying to create a case from Virtual  Agent by mapping some of my mandatory fields. But, the below code is not working and not creating a case.

 

(function execute() {
var caseBT = new GlideRecord('sn_customerservice_b2b_technical_support');
caseBT.initialize();
caseBT.category = 3;
caseBT.contact_type = 'virtual_agent';
caseBT.account.name = vaInputs.your_account;
caseBT.u_outage_start_date = new GlideDateTime();
caseBT.initiated_as_request = false;
caseBT.short_description = vaInputs.short_description;
caseBT.description = vaInputs.short_description;
caseBT.contact = gs.getUserID();
caseBT.u_installed_base_item = vaInputs.device_product_affected;
caseBT.setWorkflow(true);
vaVars.caseRecord = caseBT.insert();
//gs.log("PRODUCT IS ::: " +vaInputs.device_product_affected);
return vaVars.caseRecord;
})()

 

Any help for the above would be grateful 🙂

 

 

Thanks,

Sreesh Surendran

0 REPLIES 0