SSNF-S010 Answer Guide
SSNF-S010 Answer Guide
SSNF-S010 Answer Guide
1
NOTE: Not all answers are provided in this document (for example, answers to questions
asking for your opinion or questions asking you to predict what will happen when
an action is performed).
2
A6 - QUESTION: How do you ask a question when you cannot find the information
you are looking for in the Community?
ANSWER: Go to the Community main page and select Have a question? or Post
Content > Question to open a form with input fields for question title, forum, topic(s),
version, description, and attachments.
• The Have a question? input field on the main page
• Reply to an existing post to clarify any additional questions you may have on
the topic.
B6 - QUESTION: Review the API release notes article. What information is provided?
ANSWER:
• New scoped classes and additional methods for existing classes
• New global classes and additional methods for existing classes
C7 - QUESTION: What Date/Time format does the GlideDateTime object use?
ANSWER: Greenwich Mean Time (GMT)
3
B7 - QUESTION: Create a new Incident. What happens when the form loads for the
new incident?
ANSWER: The Client Script’s trigger is set to execute onLoad, therefore when a new
Incident opens, the form loads.
D6 & D11 - QUESTION: Did the “Resolved” or “Closed” value remain in the State field?
Why or why not?
ANSWER: No, the script set the value of the saveAndClose variable to false. This
prevented the record from saving any changes when the callback function
executed. The script will only save the record if the saveAndClose variable contains
the value true.
Module 3 - UI Policies
Lab 3.1 Incident Resolved/Closed UI Policy
B11 - QUESTION: Does the ‘Reverse if false’ field need to be selected for the ‘Execute
if false’ script to execute?
ANSWER: Yes, it does. The script in the Execute if false field will never execute if the
Reverse if false field is not selected.
B12 - QUESTION: When the ‘Reverse if false’ field is selected and the ‘Execute if false’
field is empty, does the reverse of what is scripted in the ‘Execute if true’ field occur?
ANSWER: No, it does not. If the Reverse if false field is selected and the Execute if
false field is empty, a script will not execute if the UI Policy’s conditions are not met.
5
ANSWER: When the Script Debugger pauses at a breakpoint, it stops the script
before the statement it is paused at executes. In this lab, the first breakpoint paused
the script before the value of the myNum variable was set, therefore it is undefined.
Once the script continued to the next breakpoint, the value of the variable was set
to the value current in the State field.
C4b, C5b, C6 - QUESTION: Document the “previous” object's short_description
field value and the “current” object's short_description field value. Why are they
different?
ANSWER: current is an object that stores the current record’s fields and values, and
previous is an object that stores the record’s fields and values before any changes
were made.
D11, D14, & D17 - QUESTION: How can you be sure which script you are currently
debugging?
ANSWER: The Code Pane Header reads Business Rule > Lab 5.1 Business Rule
Debugging for D11 and D17 Script Include > SlaTargetNotification for D14.
E5 - QUESTION: Which undefined function produced an error and why?
ANSWER: The thisFunctionDoesNotExist() function produced an error because it was
scripted inside a try/catch. The error handling scripted in the catch block uses the
global gs.log() method to produce the error output.
E6 - QUESTION: Was a log message produced for the undefined
thisFunctionAlsoDoesNotExist() function?
ANSWER: No
G2 - Select the Session Log tab and search for the execution of the Lab 5.1 Business
Rule Debugging Business Rule by searching for the string ==> Lab 5.1 Business Rule
Debugging. Did your test meet the Business Rule's Condition criteria? How can you
tell?
ANSWER: It did not meet the criteria and the debugging output advises it skipped
the Business Rule because the condition current.state !7 was not satisfied. An excellent
strategy to see if your Business Rule executed.
6
Lab 5.2 Current and Previous
C8 - QUESTION: Does the RCA included field need to remain visible on the form?
ANSWER: It does not. The Business Rule will take care of ensuring it is populated
properly. Manual updates are not needed. The field can then be used to query the
table for a list of records with RCA details included.
7
Lab 8.3 HelloWorld GlideAjax
B5 - QUESTION: The first parameter in the script is 'sysparm_name', which is a
reserved parameter name. What information does it pass to the Script Include?
ANSWER: sysparm_name passes the name of the method/function you want to use.
B6 - QUESTION: Other than beginning with a “sysparm_” prefix, do additional
parameters have to use reserved parameter names?
ANSWER: They do not. If the parameter name begins with sysparm_ and has no
spaces or special characters, you can give the parameter whatever name you like.
It is considered best practice for parameter names to describe the data being
passed to the Script Include (for example, sysparm_start_date, sysparm_user_name,
sysparm_manufacturer).