5 Intro to Scripting & Application Tools Flashcards
What is scripting in ServiceNow?
The customization of an instance and/or application using JavaScript
- executes on client (scripts that run in a web browser) or server side (scripts that run on the server, where the database resides)
What is a UI Policy?
User Interface Policy
A rule that is applied to a form or a list to dynamically change information to the field itself
(client-side)
What is a Data Policy?
Enforces requirements on field and record data when the data is inserted into ServiceNow or when the data in an Import Set is submitted via an external system
(server-side but can be added to client-side, by checking box “Use as UI Policy on client)
Unlike UI Policies, Data Policies apply to all data entered into the Platform
What can client scripts be created to do? (1 + 3)
They make “real-time” changes to the appearance of the user interface (especially forms)
- update the location field to reflect the value entered in the caller field
- disable the attachment link of a closed record when the form is loaded so a user is unable to add or modify changes
- display a notice at the top of the page to confirm a catalog request was created
Name four of the supported Client Scripts:
onLoad()
onChange()
onSubmit()
onCellEdit()
Name four of the supported Client Scripts:
onLoad()
- runs when a form is first drawn and before control is given to the user to begin typing (when form is loaded)
onChange()
- runs when a particular field changes value
- script applies to a particular field on a form rather than on the form itself
onSubmit()
- runs when a form is saved/submitted/updated
onCellEdit()
- runs when a cell in a list changes value through use of the list editor
How can you use a UI Policy to set fields on a form? (3)
You can use them to make fields on a form to:
Mandatory or Optional
Hidden or Visible
Read-only or Editable
These are called UI Policy Actions
What is a UI action?
UI actions add buttons, links, and context menu items on forms and list, making the UI more interactive, customized and specific to customer activities
UI actions can contain scripts that define custom functionality and can appear on the server or client side
Name 7 examples of UI actions:
Form buttons
Form context menu items
Form links
List buttons
List context menu items
List choices (at the bottom of a list)
List links (Related Link at the bottom of a list)
What is a Business Rule?
A Business Rule is a server-side script that is configured to run when a record is displayed, inserted, updated, deleted or when a table is queried. Thus, unlike Client Scripts, Business Rules do NOT run real-time
What does every Business rule include? (4)
What table to run and what timing
What conditions to evaluate
What script to run based on evaluation
If its client-callable
What type of scripts run on the browser?
Client-side scripts:
UI Policies
Client Scripts
Which script runs when a record is displayed, inserted, updated, deleted or when a table is queried?
Business Rule
Does a business rule run on the client or server side?
Server side
What provides additional functionality within an instance?
Plugins
System Definition > Plugins
What do you configure to instruct fields how to behave on a form when a UI Policy is triggered?
UI Policy Action
What does an Update Set do?
It tracks changes to applications and platform features then groups them together so they can be moved from one instance to another
- a “point in time” XML snapshot of process records
- works by writing changes from tracked tables to the Customer Update [sys_update_xml] table
What is captured in an Update Set?
Customizations and configuration changes are captured, NOT the changes to data records or Dashboards (the last can be added manually)
Update Sets act as a container for configuration records
What steps are typically included in the process of applying an Update Set (applying an update set to an instance)?
- Retrieve
- Preview
- Commit
What steps are typically included in the retrieval process of an update set?
- System Update Sets > Retrieved Update Sets
- Click Import Update Set from XML under Related Links
- Choose a file to upload
- Upload the file
What does the IntegrationHub provide?
A single solution to quickly integrate with third party services to build and share content without scripting
What is used to move customizations from one instance to another?
Update Sets
Which types of records are not captured in an update set by default?
Data records
Users, groups, roles (?)
+ Dashboards (can be added manually)
Which ServiceNow tool is used by developers to create custom applications?
Studio