
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2018 11:55 PM
Greetings,
My first post/question on the ServiceNow community, I am currently working with a record producer. The idea here is that as soon as the incident is generated, I want it to be marked as resolved.
Here is my record producer script so far.
current.contact_type = "Walk-in";
current.impact = 4;
current.urgency = 4;
current.priority = 3;
current.u_incident_category = "Desktop Software";
current.u_incident_subcategory = "Support";
current.setDisplayValue("assignment_group","A");
current.short_description = "This is a test";
current.u_closeaction = "Advised";
current.close_code = "Solved (Permanently)";
current.work_notes = "Completed";
current.state = "Resolved";
I double checked that I am setting all of the required fields. I also made sure to set the state to resolved last in my script. If anyone knows why this isn't setting my incident to "Resolved" I'd be very appreciative.
Solved! Go to Solution.
- Labels:
-
Personal Developer Instance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2018 10:36 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2018 10:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2018 10:58 AM
Hello,
This is because of the Resolved Label as mentioned by Rahul, Also close notes was mandatory when i checked OOB.
Maybe you should try changing both if the state change didnt work
current.state = 6;
current.close_notes ='Test';
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2018 06:28 PM
This is a great suggestion. My close notes are actually mapped by the record producer field I created so I don't have them in the script but the data is in fact there. I will try your suggestion for current.state and report back.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2018 10:15 PM
Thanks guys, you were totally right, I needed to set it to
current.state = 6;
instead of
current.state = "Resolved";