- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2022 10:16 PM
Hi Community,
is there a way I can create an incident using a record producer using script. if yes please help me.
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2022 02:24 AM
Hi,
but why do you wish to populate variables?
User is not submitting record producer but having chat with VA
When submission happens via record producer then variables are populated
have a look on this for how to submit record producer via script; this might help you
How to Trigger change workflow/record producer from transform script
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2022 11:51 PM
Hi,
so what all information you are asking from user via VA?
that record producer must be having some variables; ask same information to user and create incident using script
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2022 02:10 AM
Hi Ankur,
I'm creating incident using normal incident creation script below, Im able to populate few fields but not the variables, can you help me how yo pull the variables
the variables are:
1. impact
2.please specify the application
3.description
(function execute() {
var gr = new GlideRecord('incident');
gr.initialize();
gr.caller_id = gs.getUserID();
gr.opened_by = gs.getUserID();
gr.short_description = vaInputs.description;
gr.description = vaInputs.description;
gr.business_service = "a8c4c649dbf94740b0463c9b7c961914";
gr.cmdb_ci = vaInputs.application;
gr.assignment_group = "0ae2acefdbce0f0067e1dd3b5e96199b";
gr.contact_type = "self-service";
gr.impact=vaInputs.impact;
gr.insert(); //insert the new record
})()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2022 02:24 AM
Hi,
but why do you wish to populate variables?
User is not submitting record producer but having chat with VA
When submission happens via record producer then variables are populated
have a look on this for how to submit record producer via script; this might help you
How to Trigger change workflow/record producer from transform script
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2022 06:36 AM
Hope you are doing good.
Did my reply answer your question?
If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2022 10:23 PM
Hey Shiva,
A record producer creates a ticket on any table you specify for the record producer, no need to create a script to do this
Record Producer | ServiceNow Docs
please mark helpful or correct 🙂