Platform Scripting Flashcards

1
Q

What are plugins?

A

Software components that provide additional optional features & functionality withing a ServiceNow instance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the recommendation before adding scripts in ServiceNow?

A

Check the list of available plugins

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

In which application can one look for available plugins?

A

System Definition > Plugins

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do we get a plugin that is only made available upon request?

A

By submitting a request using the Request Plugin Activation form at Now Support (HI)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is Scripting in ServiceNow used for?

A

The customization of an instance and/or applications using JavaScript

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What functionality is recommended to use for configurations instead of scripting?

A

Condition Builder

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are APIs?

A

Classes and methods that we can use in scripts to define and customize functionalities

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is an application or system that is used to access a remote server?

A

Web browser

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How is a server defined?

A

A physical computer running one or more services, or a system running a database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Define Client-Side scripts in short

A

Scripts that run in the browser

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Define Server side scripts in short

A

Scripts that run on the server (where the DB lives)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a round-trip?

A

Request + Response

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Can we run a Client script when a database lookup is needed?

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are different types of supported Client scripts?

A
  • onLoad()
  • onChange()
  • onSubmit()
  • onCellEdit()
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

When does onLoad() run?

A

When a form is loaded and before a user can edit it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

When does onChange() run?

A

When the value of a field changes.
onChange() applies to fields rather than to forms

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

When does onSubmit() run?

A

When a form is

  • saved
  • submitted
  • updated
  • Used to validate that the values entered on a form make sense before saving
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

When does onCellEdit() run?

A

When a cell on a list changes value through use of the list editor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What can be used to implement updates and changes to forms and lists without having to write scripts?

A

UI policies

20
Q

Define a UI policy.

A

A rule that is applied to a form or a list to dynamically change information or the form itself

21
Q

What functionality determines what happens on the form once a UI policy is configured?

A

UI policy actions

22
Q

Give examples of UI policy actions on a form

A
  • Set a field as mandatory
  • Set a field as hidden
  • Set a field as read-only
23
Q

Recall what a Data policy is used for in the platform

A
  • Data policy enforces requirements on field and record data when the data is imported into ServiceNow
  • Used to set mandatory and read-only states on form fields
24
Q

What are the differences between Data policy and UI policy controls?

A
  • UI policies are only enforced on data entered into a form or a list through the UI
  • Data policies are applied to all data entered into the platform (UI, import sets, web services)
25
Q

How to make a data policy run as a UI policy?

A

Set the data policy attribute Use as UI Policy on client to true (check the box)

26
Q

What do UI actions do?

A
  • UI actions add buttons, links, context menu items on forms and lists
  • UI actions make the UI more interactive and customizable based on user activities
27
Q

UI actions include…

A
  • Form buttons
  • Form context menu items (right-click form header)
  • Form links (Related links in a form)
  • List buttons
  • List context menu items
  • List choices (at the bottom of a list)
  • List links (Related links at the bottom of a list)
28
Q

How do we make a UI action visible so that a user can interact with it?

A

Check the UI Action Active checkbox

29
Q

How do we make a UI action display before another UI action in the User Interface?

A

By setting its Order attribute (100 displays before 200 and after 10)

30
Q

Where can UI actions execute?

A

UI Actions can execute client-side and/or server-side

31
Q

How to make a UI Action execute client-side?

A

By checking the UI Action Client attribute

32
Q

Can UI Actions be scripted to define complex functionality?

A

Yes

33
Q

Where do we navigate to show the Save, Insert, and Insert and Stay buttons on forms?

A

All > System Properties > UI Properties > “Show Save, Insert, Insert and Stay buttons on forms”

34
Q

What is a business rule?

A

A business rule is a server-side script that runs when a record is
- inserted
- displayed
- updated
- deleted

or when a table a queried

35
Q

When can business rules be set to run relative to database action?

A

Business rules can be set to run before or after a database action has occurred.

  • Go to When to run in the BR form and choose Before or After
36
Q

When are business rules loaded and initialized?

A

Business Rules are loaded and initialized at the beginning of each interaction between the user and the platform

37
Q

How are business rules assigned regarding scope?

A

Every business rule is assigned either to an application scope or to the global environment

38
Q

Which attribute must we select as true in the Business Rule form so that we can configure the When and Order fields?

A

Select the Advanced attribute checkbox

39
Q

What are the main components of a Business Rule?

A
  • the table the BR runs against
  • the timing: When to run tab (before / after / async / display) relative to an insert or update
  • the Actions tab
  • which conditions to evaluate
  • the script to run based on the evaluation
40
Q

What are the 4 choices for When to run a Business Rule?

A
  • Before a record is saved to the DB
  • After a record is saved to the DB
  • Async (queued) for the client not to wait on the server
  • Display before the record is displayed
41
Q

What are the 2 fields in the Advanced tab of a Business Rule form?

A
  • Condition field: to specify the JavaScript condition to run the script
  • Script field: to write the script that runs when the condition is true
42
Q

Are Business rules real-time?

A
  • No.
  • Business rules do not monitor fields on a form
  • Business rules monitor records as they are inserted and updated
43
Q

What is the primary objective of the Display Business Rule?

A

Use a shared scratchpad object “g_scratchpad” which is sent to the client as part of the form.

Useful when need to build client scripts that require server data that is not part of the record being displayed

44
Q

What are the first steps when creating a UI Policy?

A

Identify the condition(s) under which the UI policy should be applied

45
Q

Where to navigate to create a UI Policy on the incident table?

A

All > Incident > Open an incident > List context menu > Configure > UI Policies > New

All > System UI > UI Policies > Select [incident] table