virtual agent script to fill the column value with default value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2024 11:37 PM - edited 03-27-2024 03:54 AM
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".
Please help us modify the script in achieving this.
Regards,
Padmaja.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2024 11:03 PM
Hi Padmaja,
Will you please share the whole code.
We cannot help just from a snippet of a code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2024 02:18 AM
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 as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2024 11:14 PM
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