- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 04-29-2019 07:25 PM
Welcome to the ServiceNow Knowledge19 Pre-Conference - Scripting in ServiceNow Fundamentals!
This is a dedicated Community Article for class communication, collaboration, and fun!!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
If you don't already have your own ServiceNow developer instance then head to http://developer.servicenow.com to request one.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Here are the additional Conference Sessions.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
FYI. LAB 2.04 is listed as "Lab 2.5 Reference Object" when following Step #1 of the lab.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Did anyone else notice the "risk" in the last lab 2.4/2.5, when scripting, actually added "5" as a choice? To fix, you can add the missing risk choices from available to selected.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Yes, your are right.
Thanks for sharing that.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
To learn more about Javascript loops go to https://www.codecademy.com/articles/fwd-js-loops

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Script Execution Rollback Information:
https://community.servicenow.com/community?id=community_blog&sys_id=27804903db63530054250b55ca961938

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
For those completing the Flow Designer Lab 11.03 - here is the appended snippet:
(function execute(inputs, outputs) {
var startDate = new GlideDateTime(inputs.created_on);
var endDate = new GlideDateTime(inputs.resolved_at);
var calcDiff = GlideDateTime.subtract(startDate, endDate).getRoundedDayPart();
var report = "After Action Report\n" +
"Subject: After Action Report, " + inputs.assigned_to + " – " + inputs.assignment_group + "\n" +
inputs.created_on + " – " + inputs.resolved_at + "\n\n" +
inputs.number + " with '" + inputs.short_description + "' was entered into ServiceNow by " +
inputs.created_by + " for " + inputs.caller_id + ". " +
"The Configuration Item affected was " + inputs.cmdb_ci + " . " +
"Resolved by " + inputs.resolved_by + " with a Resolution code of " + inputs.closed_code + "." +
"Resolution notes are as follows: " + inputs.close_notes + "\n\n" +
"Total time: " + calcDiff + " Days";
outputs.Payload = report;
})(inputs, outputs);