virtual agent script to fill the column value with default value

Padmaja5m2
Tera Contributor

Hi team, 

we have a script to accept the values from user via virtual agent and set the filed values as below using script action utility. Now we need to add the value as "Virtual agent" for the column contact_type. By default it is taking self-service as column value and now that has to be set as "Virtual agent".

Padmaja5m2_1-1711521286586.png

 

Padmaja5m2_0-1711521191196.png

 

Please help us modify the script in achieving this. 

 

Regards,

Padmaja.

 

3 REPLIES 3

Vishwa Pandya19
Mega Sage

Hi Padmaja,

 

Will you please share the whole code.
We cannot help just from a snippet of a code.

Hi Vishwa,

We have changed the code and tried giving the value of contact type column value on sc_req_item table instead of giving it in catItem variable. Thanks for the response

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

Instead of a variable, you mean the Contact Type field on sc_req_item?

 

Do note that you might want to replace the usage of new Cart. That's a deprecated API.

https://docs.servicenow.com/csh?topicname=c_CartJSScoped.html&version=latest

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn