ServiceNow CAD Practice Test Questions and Exam Dumps Part4 Q61-80

View Full ServiceNow CAD Exam Dumps and Practice Test Dumps.

 

Question 61

Which ServiceNow object is commonly used to access platform-level server-side functionality such as logging messages?

  1. GlideRecord
  2. GlideSystem
  3. GlideAjax
  4. GlideAggregate

Correct Answer: 2

Explanation

The GlideSystem API, commonly accessed through the gs object, provides many platform-level functions in server-side scripts. Developers can use methods such as gs.info(), gs.warn(), and gs.error() to write messages to system logs. GlideSystem also provides functions for retrieving system properties, accessing user information, and working with other platform features. GlideRecord is primarily used for database operations, GlideAjax provides client-to-server communication, and GlideAggregate performs aggregate database queries. Understanding GlideSystem is important for debugging and building server-side application logic because it provides several commonly used platform utilities.

Question 62

Which Business Rule type is executed when a record is displayed to a user?

  1. Before
  2. After
  3. Display
  4. Async

Correct Answer: 3

Explanation

A Display Business Rule runs when a record is loaded and is primarily used to prepare server-side information for client-side scripts. One common use is placing information into g_scratchpad, which can then be accessed by Client Scripts on the form. Display Business Rules execute before the form is presented to the user, but they are different from Before Business Rules that modify records before database operations. After Business Rules run after database operations, while Async Business Rules process work asynchronously in the background. Display Business Rules should be used when server-derived information is required by client-side form logic.

Question 63

Which object is commonly used with a Display Business Rule to pass server-side data to client-side scripts?

  1. g_scratchpad
  2. current
  3. previous
  4. gs

Correct Answer: 1

Explanation

g_scratchpad provides a mechanism for transferring server-side information from a Display Business Rule to client-side scripts when a form loads. A developer can set properties on g_scratchpad in the Display Business Rule and then access those properties from an onLoad Client Script. This can be useful when client-side logic needs information that must be calculated or retrieved on the server. The current object represents the current record, previous can represent previous record values in appropriate Business Rule contexts, and gs provides GlideSystem functionality. Using g_scratchpad can reduce unnecessary client-to-server calls during form initialization.

Question 64

Which method is generally used to update an existing record using GlideRecord?

  1. insert()
  2. query()
  3. update()
  4. initialize()

Correct Answer: 3

Explanation

The update() method is used to save changes made to an existing GlideRecord back to the database. A typical script queries for a record, moves to the desired result using next(), changes one or more field values, and then calls update(). The insert() method creates a new record, query() executes a database query, and initialize() prepares a GlideRecord object for creating a new record. Developers should use update operations carefully, especially when processing multiple records, because a poorly constructed query can unintentionally modify a large number of records.

Question 65

What is the primary purpose of a Data Policy?

  1. Control navigation menus
  2. Enforce data requirements at the server level
  3. Create application roles
  4. Display related lists

Correct Answer: 2

Explanation

Data Policies are used to enforce data requirements, including mandatory field behavior, at the server level. This is important because data can enter ServiceNow through many channels, including forms, imports, integrations, and APIs. Client-side controls such as UI Policies mainly affect form behavior and may not apply to every method of data entry. Data Policies help provide consistent data requirements across different entry methods. They do not create roles, control application navigation, or manage related lists. Developers should select Data Policies when the requirement concerns data validity across multiple entry mechanisms rather than only the visual behavior of a particular form.

Question 66

Which ServiceNow feature is used to define a relationship between records that can be displayed as a related list?

  1. Database View
  2. Relationship
  3. UI Macro
  4. System Property

Correct Answer: 2

Explanation

A relationship can define how records from one table are related to records in another table and can support displaying related information through related lists. Relationships are useful when developers need to establish application-specific connections between records that are not provided automatically through reference fields or table inheritance. Database Views are designed for combining data from multiple tables for reporting or querying, UI Macros provide reusable UI components in supported contexts, and System Properties store configurable values. Understanding record relationships helps developers design applications that allow users to navigate logically between related records and understand the context surrounding a particular record.

Question 67

Which feature allows developers to define custom application tables and fields while building an application?

  1. Application Studio
  2. Event Registry
  3. Notification
  4. Scheduled Script Execution

Correct Answer: 1

Explanation

Application Studio provides tools for developing applications and configuring application components, including tables and other application artifacts. Developers can use ServiceNow’s application development environment to define data structures, business logic, user experiences, and other components needed by an application. Events are used to trigger event-driven processing, Notifications communicate information to users, and Scheduled Script Executions run server-side code on a schedule. Application development generally involves combining multiple platform capabilities rather than relying on one component. Understanding the development environment helps developers organize application files and build solutions using supported ServiceNow development practices.

Question 68

Which script type is intended to validate a form before it is submitted?

  1. onLoad Client Script
  2. onChange Client Script
  3. onSubmit Client Script
  4. Display Business Rule

Correct Answer: 3

Explanation

An onSubmit Client Script runs when a user attempts to submit a form and is commonly used to perform client-side validation before the record is sent to the server. The script can inspect field values and return false to prevent submission when specified conditions are not satisfied. onLoad scripts run when the form opens, while onChange scripts run when a configured field changes. Display Business Rules execute server-side when a record is loaded. Although onSubmit scripts are useful for improving the user experience, important validation and security requirements should also be enforced server-side when necessary.

Question 69

What is the main purpose of an Import Set?

  1. Temporarily stage imported data before transformation
  2. Store application source code
  3. Define user authentication policies
  4. Create email templates

Correct Answer: 1

Explanation

An Import Set provides a staging area for data imported into ServiceNow before that data is transformed into records in a target table. External data can be loaded into an import set table and then processed using a Transform Map. During transformation, field mappings, scripts, coalescing, and other rules determine how source data becomes target records. This separation allows developers to inspect and transform incoming data before it affects production application tables. Import Sets are not intended for storing application source code, defining authentication policies, or creating email templates. They are an important part of ServiceNow’s data import architecture.

Question 70

Which ServiceNow component defines the fields, field types, and metadata associated with a table?

  1. Notification
  2. Dictionary
  3. UI Action
  4. Flow

Correct Answer: 2

Explanation

The ServiceNow Dictionary contains metadata describing fields and database elements. Dictionary records define characteristics such as field type, length, reference relationships, default values, and other properties. This metadata determines how fields behave and how they are represented within the platform. Notifications are used for communication, UI Actions provide interactive controls, and Flows automate processes. Developers frequently work with dictionary configuration when creating custom fields or modifying field behavior. Understanding dictionary metadata is also useful when troubleshooting issues related to field types, inherited fields, reference fields, and other database-level application characteristics.

Question 71

Which API is commonly used to retrieve the unique identifier of the current record?

  1. current.getUniqueValue()
  2. current.getRecord()
  3. current.getIdentifier()
  4. current.getNumberValue()

Correct Answer: 1

Explanation

current.getUniqueValue() is commonly used in server-side scripts to obtain the unique identifier, typically the sys_id, of the current record. A sys_id uniquely identifies a record within its table and is frequently used when referencing records programmatically. Developers may need this value when passing record identifiers to other functions, constructing URLs, or performing related record operations. The other listed methods are not the standard GlideRecord method for retrieving the current record’s unique identifier. Understanding sys_id values is essential in ServiceNow because references between records and many platform operations depend on these unique identifiers.

Question 72

Which ServiceNow capability allows developers to create reusable processes that can be invoked from multiple flows?

  1. Client Script
  2. Subflow
  3. UI Policy
  4. Dictionary Override

Correct Answer: 2

Explanation

A Subflow in Flow Designer allows developers to package reusable automation logic that can be invoked from multiple flows. This helps avoid duplicating the same sequence of actions across different automations. A subflow can accept inputs, perform actions, and return outputs where appropriate. This design promotes modularity and simplifies maintenance because changes to shared logic can be made centrally. Client Scripts and UI Policies handle client-side form behavior, while Dictionary Overrides modify inherited field configurations. Reusable subflows are especially valuable in larger applications where multiple business processes need to perform the same set of standardized operations.

Question 73

What is the primary purpose of a Notification in ServiceNow?

  1. Execute database queries
  2. Send information to users through configured communication channels
  3. Create database fields
  4. Modify table inheritance

Correct Answer: 2

Explanation

Notifications are used to communicate information to users when specified conditions or events occur. They can be configured to send messages through supported channels such as email and can use record information to personalize the content. Notifications may be triggered by record conditions or events depending on the design. Database queries are handled through APIs such as GlideRecord, fields are defined through table and dictionary configuration, and table inheritance is configured through application development tools. Developers should design notification conditions carefully so that users receive relevant information without generating excessive or unnecessary messages.

Question 74

Which feature can be used to create a server-side script that runs automatically when a specific event occurs?

  1. Script Action
  2. UI Policy
  3. Client Script
  4. Form Layout

Correct Answer: 1

Explanation

A Script Action is server-side logic that executes in response to a registered ServiceNow event. Events can be generated by application logic, and Script Actions can respond to those events to perform additional processing. This provides an event-driven architecture that can separate the code generating an event from the code handling it. UI Policies and Client Scripts control browser-side behavior, while Form Layout determines the placement of fields on a form. Script Actions can be useful when an operation should happen asynchronously or independently after a particular event has been generated.

Question 75

Which mechanism can be used to restrict access to records based on a user’s role?

  1. ACL
  2. UI Macro
  3. Transform Map
  4. Scheduled Job

Correct Answer: 1

Explanation

Access Control Lists, or ACLs, are the primary ServiceNow mechanism for controlling access to tables, records, and fields based on permissions such as roles, conditions, and scripts. An ACL can require a user to possess a particular role before allowing an operation such as read or write. This security enforcement occurs at the platform level and is therefore more reliable than simply hiding interface elements. UI Macros are related to reusable interface components, Transform Maps handle data transformation during imports, and Scheduled Jobs execute code at defined times. Proper ACL design is fundamental to protecting application data.

Question 76

What does table extension allow in ServiceNow?

  1. A child table to inherit fields and functionality from a parent table
  2. A table to automatically become read-only
  3. A table to bypass ACLs
  4. A table to disable database indexing

Correct Answer: 1

Explanation

Table extension allows a child table to inherit fields, behaviors, and functionality from a parent table. This supports object-oriented application design and allows developers to reuse common platform functionality. For example, several task-based tables can inherit common fields and functionality from the Task table. Extension does not automatically make a table read-only, bypass security controls, or disable indexing. Developers should choose a suitable parent table when designing custom applications because inheritance can significantly affect the fields, behaviors, and security model available to the child table. Proper table design helps reduce duplication and promotes consistency.

Question 77

Which method is commonly used to add a condition to a GlideRecord query?

  1. addFilter()
  2. addQuery()
  3. addCondition()
  4. setQuery()

Correct Answer: 2

Explanation

The addQuery() method is commonly used to add conditions to a GlideRecord query. Developers can specify a field, an operator, and a value to restrict which records are returned. Multiple addQuery() calls can be combined to build more specific queries. After defining the conditions, the developer calls query() to execute the database operation and uses next() to process the returned records. Using precise query conditions is important for both correctness and performance. Developers should avoid retrieving large numbers of unnecessary records because excessive database processing can negatively affect application performance.

Question 78

Which development approach helps prevent direct modification of production application code?

  1. Developing and testing changes in a separate development instance before deployment
  2. Editing production scripts whenever a change is requested
  3. Disabling version control
  4. Avoiding update tracking

Correct Answer: 1

Explanation

A controlled development process typically involves creating and testing application changes in a development environment before moving them to test and production. This reduces the risk of introducing untested changes directly into a live system. ServiceNow provides deployment mechanisms such as Update Sets and source-control-based workflows depending on the application and development model. Directly modifying production scripts can create operational risks and makes troubleshooting and rollback more difficult. Development teams should establish a controlled lifecycle involving development, testing, review, and deployment. This approach improves consistency and helps ensure that application changes are properly tracked.

Question 79

What is the purpose of a Reference field in ServiceNow?

  1. Store a relationship to a record in another table
  2. Store only numerical calculations
  3. Store encrypted passwords automatically
  4. Define application navigation

Correct Answer: 1

Explanation

A Reference field stores a relationship to a record in another ServiceNow table. For example, an Incident’s Assigned to field can reference a user record in the User table. Reference fields allow users to select related records and enable developers to access information from referenced records. Reference qualifiers can further restrict which records are available for selection. Reference fields are different from simple string or integer fields because they maintain a platform-level relationship using the referenced record’s unique identifier. This relational structure is fundamental to ServiceNow application design and allows related records to be connected and navigated efficiently.

Question 80

Which practice is most appropriate when a Business Rule needs to modify the current record before it is saved?

  1. Use an Async Business Rule
  2. Use a Before Business Rule
  3. Use a Display Business Rule
  4. Use a Scheduled Script Execution

Correct Answer: 2

Explanation

A Before Business Rule is appropriate when server-side logic needs to modify the current record before it is saved to the database. Developers can set values on the current object, and those changes become part of the same database operation. This is useful for calculating field values, enforcing business logic, or automatically setting attributes before insertion or update. Async Business Rules run in the background after the transaction, Display Business Rules prepare data for the client, and Scheduled Script Executions run according to a schedule. Selecting the correct Business Rule timing is important for both application behavior and system performance.