ServiceNow Application Developer Certification

Ace your homework & exams now with Quizwiz!

Business Rule types

*Display* = execute after the data is read from the database and before the form is presented to the user - Primary purpose is to populate the *g_scratchpad* global object for Client Scripts *Before* = execute after form submission and before record is updated in the database *After* = execute after submission and after record update in database *Async* = execute after records are inserted/modified/queried

GlideSystem (gs) methods

*getProperty()* = returns value of Glide property *getPreference()* = gets user preference *getDisplayColumn()* = gets display column for table *tableExists()* = returns true if database table exists *nil()* = returns true if field's value is null or empty *eventQueue()* = queues event for event manager *print()* = writes message to system log *log()* = logs message to system log *logError()* = logs error to system log *getMessage()* = retrieves message from UI messages

table.* vs table.None vs table.field

*table.** = field level ACL which gives Access to all field on that table *table.None* = row level ACL allows you to access records *table.field* = applies to only specified field on a record

Custom Application name

*x_<value from glide.appcreator.company.code system property> + Application Name* (first 12 characters) *glide.appcreator.company.code* system property set by SN and NOT changeable (no chance of duplication).

Common table Data Types

- *Date/Time* = day and time of day, selected using calendar widget - *Decimal* = # with up to 2 decimal places (e.g. 12.34) - *Reference* = query that displays records from another table (e.g. sys_user) - *String* = character string - *True / False* = Boolean field represented by checkbox

Table controls

- *Extensible* = table can be extended - *Live feed* = enables *Document Feeds* - *Auto-number* = sets prefix, starting with number, and number of digits for the record - *Create access controls* = creates delete, write, read, and create permissions for table records - *User role* = creates a role for accessing the table's records

GlideUser (g_user) methods

- *getUser()* - *getUserName()* - *getUserID()* - *getUserDisplayName()* - *hasRole()* = returns true if user has specified role - *hasRoleInGroup()* = returns true if user has specified role within specified group

Roles needed for Source Control actions

- *source_control* - *admin*

Flow Designer triggers

- Application (MetricBase, Service Catalog) - Record - Schedule

Application Modules

- Application Menu is NOT displayed unless a module exists - Default module name is plural of application's name - 0 or 1 modules are created when a new app table is created

Default Spokes

- Benchmark Spoke - Connect Spoke - Customer Service Spoke - Field Service Spoke - ITSM Spoke - Security Operations Spoke - VTB Spoke

DO NOT build application when

- Data is unstructured (audio or video) - Requires access to proprietary libraries that do not - have an API - Multiplayer games/applications requiring graphics engine - No process flow through application

ACL debugging

- Debug single field (*Watch - <'field_name'>*) - Debug all fields (*System Security > Debugging > Debug Security Rules*) - Debug shown in order of evaluation: roles, condition, then scripts - Choose bug icon next to field to see debug information for that field - Client-side and Server-side security script debugging

UI action controls

- Form button - Form context menu - Form link - List banner button - List bottom button - List context menu - List choice - List link

Objects are available in a Script Action

- GlideRecord - current - event

Objects are available in a Scheduled Job

- GlideSystem - GlideRecord - current

Server-side debugging tools

- GlideSystem logging methods *gs.log()* = GLOBAL scope logs only *gs.error()* *gs.warn()* *gs.info()* *gs.debug()* - Debug Business Rules module - *Script Debugger* = used for debugging server-side JavaScript - *Console Debugger* = allows you to debug a script at runtime when execution is paused

Ways to make Form UX good

- Logical form layout - Field types - Meaningful labels - Tool tips and guidance help to clarify what information a user should enter - Provide real-time feedback for immediate and targeted feedback to users (*g_form.showFieldMsg()*) - Effective use of color - Use sections to organize fields on a form

Studio HAS

- Navigation and tabbed environment - Code search - Quick creation of scripts and files - Push (Repository or Internal app repository) - Global app files management

Graph types that can be created by right clicking on a column menu from a List

- Pie Chart - Bar Chart

Reasons to develop custom applications:

- Replace outdated, inadequate, custom business applications and processes - Extend service delivery and management to all enterprise departments - Extend the value of SN - Bring greater levels of automation and consolidation to enterprise services and their management

Stakeholders (Business Logic)

- Requestor and Fulfiller - Application Administrator - Management

When to use Flow over Workflow

- Running Kingston or newer - Trigger a CRUD table operation or schedule - All steps/actions needed in Flow Designer - Logic includes if/then branching or linear flow

Client-side debugging tools

- Script debug messages: *g_form.addInfoMessage()* *g_form.addErrorMessage()* - JavaScript Log and *jslog()* - *Response Time Indicator* - JavaScript debugging tools: *alert()* try/catch -Browser tools

Actions a Business Rule can take without scripting

- Set field values - Add message - Message - Abort action

Application Module configuration

- View name - Link type (Assessment, List of Records, URL (from arguments), Separator, Content Page) - Filter

Inbound Action objects

- current - email

Event Activity parameters

- event_name - parm1 - parm2 - (In scripts when called) object

Server-side logging for scoped app

- gs.warn - gs.error - gs.info - gs.debug **gs.log GLOBAL ONLY

Create Application Properties

1. Create a System Property Category 2. Add properties 3. Order properties 4. Create properties module

Importing data via Import Set

1. Data Set 2. Load Data 3. Import Set Table (IST) (ISETXXXXXX) 4. Create Transform Map 5. Transform Map 6. Run Transform 7. Target Table contains mapped data

Form submission order

1. Form submit 2. Client Script, UI Action, ScriptLoader 3. UI Script Library 4. (asynchronous) Script Include (AJAX) and Other BRs, UI Actions, SIs, Script Actions Global or Scoped 5. Script Include Library

Test an email notification

1. Preview Notification 2. Select the Event Creator 3. Preview Record 4. Confirm the recipients, subject, and message body.

Source Control integration

1. Source Repo 2. Development 3. Tag/Publish app 4. Application Repo 5. Install to Test / Prod

Module

A functionality in a menu that lets a user easily open something into a content pane or a new window.

ATF Create User

A step that will create a user with specific role(s) and group membership.

Workflow Context

A workflow's runtime environment.

Which one of the following is NOT a GlideUser (g_user) method? A. userName() B. getFullName() C. hasRole() D. hasRoleExactly()

A. userName()

Record Producer

Add records to database table using Service Catalog UI rather than a form - Available in the Service Catalog

g_form.addFieldMessage()

Adds a blue-highlighted message below the specified field.

g_form.addInfoMessage()

Adds a blue-highlighted message to the top of a form.

Create Module

Adds a default module for that table that will display a list of open entries.

Field Styles

Adds visual impact to a form EX: font-weight:bold; text-decoration:underline; font-style:italic; text-align:center; font-size:18px; background-color:blue; color:yellow;

Application-specific deployment permissions

Admin can assign a non-admin as a developer or deployment resource for an app

Instance-specific deployment user roles

Admin can assign roles that enable non-admin users to install/upgrade all apps in specific instances

Views

Allow different users to see form data in different ways

Allow Configuration

Allows out-of-scope applications to create application files for tables: -Business Rules -Client scripts -New Fields -UI Actions

Override application menu roles

Allows users without access to Application Menu to access a module

Application files

Artifacts that make up an application.

Client-side scripts (browser)

Auto-populate fields based on others, show/hide form sections - Client Scripts - UI Policies - Catalog Scripting - UI Actions

Scheduled Script Execution

Automated piece of logic which executes at a specific time and/or recurring basis **Never triggered by actions taken by users or modifications to records, so no current nor previous objects available.

Global Scope application

Baseline apps and custom applications built on SN versions prior to Scoping

Classic UX

Best for Forms and Lists display.

Set Fields, Message, Add Message, Abort Action

Business Rule actions that can be performed without scripting.

How do you configure a Scheduled Job to execute on the last day of every month? A. Set the Run field value to Periodically and the Repeat Interval value to 31 B. Set the Run field value to Periodically and the Repeat Interval value to Last Day C. Set the Run field value to Monthly and the Day field value to 31 D. Set the Run field value to Monthly and the Day field value to Last Day

C. Set the Run field value to Monthly and the Day field value to 31

Utils Script Include

Can be called from other scripts and have access to initialize function variables To create: 1. Create a new class. 2. Create prototype from the new class. 3. Script the functions. - Best practice to note purpose, parameters, and return value **Calling Util Function must instantiate object from Script Include Class

Record producer scripts (client side)

Client Catalog scripts, Catalog UI policies

ACL Security Scripting

Client-side: - *g_user Properties*: *userName, userID, firstName, lastName* - *g_user Methods*: *getFullName(), hasRole(), hasRoleExactly(), hasRoleFromList(), hasRoles()* - *g_form Methods*: *setDisplay(), setVisible(), setDisabled(), setMandatory(), setReadOnly() Server-side: - *GlideSystem Methods*: *getUser(), getUserDisplayName(), getUserNameByUserID(), userID(), hasRole()* - *GlideRecord Methods*: *canCreate(), canRead(), canWrite(), canDelete()*

Git

Cloud-based source control management system - Uses repositories and branching EX: GitLab, GitHub, Gitorious, Bitbucket, etc.

Branch

Copy of app files under the same account (Version/release) - Work on different versions of a repo at one-time - Create branch to work on new version of an existing app - Switching branches removes all files of current branch and reloads all files from repo

Create branch

Create an area in a repository to store a new version of an application. Can be done from Git or Studio.

REST API Explorer

Creates endpoints, methods, and variables used to send REST requests to a SN instance

REST API Explorer

Creates stub code for using inbound REST to interact with ServiceNow tables.

Private Scoped application

Custom application that restricts access to artificial artifacts (Access Controls, Business Rules, Script Includes, Tables, and Client Scripts)

When managing global application files, you can NOT: A. Add files from global scope to a global application B. Remove files from a global application C. Move an application file between global applications D. Move application files into or out of a scoped application

D. Move application files into or out of a scoped application

How to prevent creating configuration records for tables

Uncheck *Allow configuration* or *Can Read*

Create Application File button

Use in Studio to add application files.

producer.redirect('URL')

Use in a record producer script to send the user to 'URL' after the record producer is submitted.

Classless function

Used for Script Includes that are server-side only and will only have one function. ex: (function (yadda) {})(current,previous);

GlideRecord

Used for database operations instead of SQL queries

Rest Message

Used to develop, prototype and save outbound REST messages for use in Business Rules, Email Notifications and other server-side scripts.

REST Messages

Used to develop, prototype, and save outbound REST messages - Reusable in BRs, Email Notifications, and other server-side scripts

gs.hasRole() and current.isNewRecord()

Useful methods for ACL scripting

Git repository requirements

Username, password, URL

Auto Map Matching Fields

Utility used to determine if field names in an Import Set match the field names on the target table when importing data into ServiceNow

Web Services

Web-based method allowing apps to connect to other software apps over a network - Exchange information between service providers and service consumers

IST (Import Set Table)

Where data Import Sets store data (temporarily) before Target table

g_user.hasRoleExactly('catalog_admin')

Will return true only if the user has the role 'catalog_admin', regardless of admin status.

Guided Application Creator

Wizard to help create privately scoped applications. Enabled via com.glide.sn-guided-app-creator.

Source control roles

admin and source_control

Server-side logging

gs.info, gs.warn, gs.error, gs.debug (gs.log only in global apps)

UI Policy

Defines behavior and visibility of fields on a form (mandatory, read-only, visible) **Execute AFTER Client Scripts

ServiceNow Desktop applications automatically run on which platform(s)

Desktop and Tablet

Extend application functionality

Developers user industry-standard Javascript to do this.

User Personas (Business Logic)

Equate to roles -User, admin, manager, fulfiller, etc.

Delegated Development

Extend application development to other employees while maintaining control and governance over the platform, developer privileges, application resources, and data access - Allows non-admins to develop and deploy applications - Developer permissions are application-specific

IntegrationHub

Extends Flow Designer to provide low-code to no-code integration capabilities with 3rd party applications *com.glide.hub.integrations* plugin

REST Response

Extracted from returned data, either JSON or XML

producer.fieldname

Format for accessing a record producer field value

GlideDate and GlideDateTime methods

GMT: *yyyy-mm-dd hh:mm:ss* *beginningOfLastWeek()* *beginningOfNextMonth()* *dateDiff()* = calculates difference between 2 dates *endOfLastWeek()* *endOfNextMonth()* *minutesAgo()/daysAgo()/quartersAgo()/monthsAgo()/yearsAgo()* *now()* *nowDateTime()*

Application Repository

Good for: -Installing and updating apps on all company instances -Automatically managing applications update sets -Restricting access to applications to the same company -Deploying completed applications to end users (Does NOT track application developer.)

Application menu

Groups modules under a useful header. Can create as many as necessary for an application.

GAC (Guided Application Creator)

Guides user through application creation process and basic app contents using new, default ways to create app *com.glide.sn-guided-app-creator* plugin

Global scope

Has access to global application files and the Automated Test Frameworks.

Studio

IDE-like interface, to build custom apps

Event

Indication that something notable has occurred - Entry in *Event Queue* - Logic is written to respond to entries in the Event Queue

Application Source Control

Integration with *Git* that supports all global-scoped and private-scoped

Flow Designer

Intuitive interface for creating automated business process Properties → Trigger → Action(s) → Data Collected/Created

Stash

Locally stored set of changes to move changes between branches - Can be applied to any branch - Takes ALL local changes

Field Watcher

Logs activity for and can be used to troubleshoot for ACL rules, UI Policies, Business Rules. (NOT a Script Include?)

Coalesce

Makes a field a record's unique key

Transform Map

Maps data from data source (Import Set) table to Target Table

Server-side scripts

Modify database record, generate an event - Business Rules - GlideSystem (gs) - GlideRecord - Script Includes - Flow Designer - UI Actions

Access Control search order

Most to least specific

${event.parmx}

Notification event parameters are accessed using this format.

Application Properties

Page single application for all application properties where app values can be set - Values can be retrieved and used in scripts

Extended table workflow

Parent table workflow automatically applies to the child table.

Allow Configuration

Permits other application scopes to create artifacts for an app (Dictionary Entry, UI Action, and Client Script on the table) **BRs, Access Control, and other metadata types can extend out of scope tables where Can read is selected

Tag

Point in time marker - Once set, cannot be modified - Can be used to create a branch

Forms

Primary way users interact with an app

Application Access

Provides runtime protection for application tables against read, write, create, and delete operations ** When Application Access is granted to All application scopes, default configuration is to allow READ access only

Mapping Assist

Provides visually intuitive environment for specifying mapping between Import Set fields and production table fields

Default table access for scoped application on creation

Read only

Protection policies

Safeguard intellectual property by making application's artifact logic read-only or not visible **Only applies when apps are installed from the SN App Store - *--None--* = logic is viewable and editable - *Read-only* = logic is viewable, not editable - *Protected* = logic is not viewable

Spokes

Scoped Application containing Flow Designer content for an app or record type

Spoke

Scoped Application containing Flow Designer content for an application or record type.

REST Message testing

Select the Test link to to post the REST Message function - Configure Variable Substitutions prior for required HTTP Query Parameters - Parameters field shows variables passed at end of the endpoint *HTTP Status 200* = post was successful but does NOT mean expected results were returned

Outbound Email

Send email to select users in response to specific activities in SN - Record insert/update - Event generation - Notification workflow activity Admins can configure email: *What to send*, *When to send*, and *Who will receive*

Commit

Send local changes to Git

Subflows

Sequence of reusable actions to use in a flow **NO trigger needed

REST Preview Script

Server-side code stub generated automatically **Posts only; does NOT extract variable values

Record Producer script

Server-side script on Record Producer executes after submission and before record is written to database - Producer object used to access fields from Record Producer (*producer.redirect('URL')*, *current.field_name*) Current object is new record (*current.variable_name*)

Table access - Can read

Set for custom tables by default. If unchecked the Can Create/Update/Delete checkboxes will be disabled.

Flow testing

Simulates a flow trigger and runs against a chosen data object. Changes occur in the environment (no rollback, no protection).

Extended table fields

Start matching the parent field. If the label of a field on a child table is changed, the parent table label remains the same.

REST Endpoint

The URI to be connected to

You are writing an Async Business Rule for a table in a different scope than the Business Rule record. Which one of the following database operations CANNOT be part of the Async Business Rule's configuration? A. Query B. Update C. Delete D. Insert

A. Query


Related study sets

第11课 part 1《我会说一点儿汉语》text

View Set

NC Life Insurance - Other Life Topics - Chapter Quiz

View Set

Life Insurance and Annuities-Policy Replacement and Cancellation

View Set

TestOut IT Fundamentals Pro Chapter 4: Section Quizzes 4.5.16 -> 4.8.4

View Set