View Full ServiceNow CAD Exam Dumps and Practice Test Dumps.
Question 261
Which ServiceNow object is used to define the metadata and configuration of a field?
- Business Rule
- Dictionary Entry
- UI Action
- Script Include
Correct Answer: 2
Explanation
A Dictionary Entry defines metadata and configuration for a field in ServiceNow. It can specify properties such as the field’s data type, length, default value, reference table, and other attributes. Developers and administrators use Dictionary Entries to control how fields behave and how their data is represented within the platform. Dictionary configuration is different from UI Policies, which dynamically control field behavior on forms. Understanding Dictionary Entries is important when creating or modifying tables and fields because they establish fundamental information about how ServiceNow stores and handles field data.
Question 262
Which Business Rule timing is most appropriate when a developer needs to modify field values before the record is written to the database?
- Before
- After
- Async
- Display
Correct Answer: 1
Explanation
A Before Business Rule executes before the database operation occurs. It is commonly used when developers need to modify field values, calculate values, validate information, or set defaults before the record is saved. Because the rule executes before the database write, changes made directly to the current record can be saved as part of the same transaction without requiring another update operation. After Business Rules execute after the database operation, while Async Business Rules execute asynchronously. Display Business Rules are intended for preparing server-side information when a record is being displayed to a user.
Question 263
Which method can be used to retrieve the human-readable display value of a GlideRecord field?
- getValue()
- setValue()
- getDisplayValue()
- addQuery()
Correct Answer: 3
Explanation
The getDisplayValue() method returns the display value associated with a field. This is especially useful for reference fields, where the stored value is normally a sys_id but the user-facing value may be a person’s name, group name, or another descriptive value. By contrast, getValue() returns the underlying field value. Developers often use getDisplayValue() when constructing messages, notifications, logs, or user-facing output. Choosing between these methods depends on whether the script needs the database value or the value that is normally presented to users.
Question 264
What is the main purpose of a ServiceNow application menu?
- To store database records
- To define navigation categories and provide access to modules
- To enforce field-level security
- To execute scheduled scripts
Correct Answer: 2
Explanation
An application menu organizes navigation within the ServiceNow platform and provides users with access to related modules. For example, an application menu might contain modules for creating records, viewing lists, or accessing reports associated with an application. The menu itself does not store business records or execute server-side scripts. Access to modules can also be controlled through roles and other configuration. Application menus therefore contribute primarily to navigation and usability. Developers creating custom applications commonly configure an application menu and its modules so users can easily locate the functionality provided by the application.
Question 265
Which method is commonly used to move through records returned by a GlideRecord query?
- initialize()
- next()
- insert()
- get()
Correct Answer: 2
Explanation
The GlideRecord next() method is used to move the GlideRecord cursor to the next record returned by a query. A common server-side pattern is to create a GlideRecord object, add query conditions, call query(), and then use a while (gr.next()) loop to process each returned record. The method returns true when another record is available and false when there are no more records. This makes it essential for iterating through query results. Methods such as insert() and update() instead perform database modifications, while initialize() prepares a GlideRecord for a new record.
Question 266
Which ServiceNow component can be used to display a confirmation or action button to users on a form?
- UI Action
- Data Policy
- Dictionary Entry
- Transform Map
Correct Answer: 1
Explanation
A UI Action can provide buttons, links, and menu actions to users on ServiceNow forms and lists. Developers can configure a UI Action with conditions and scripts to perform specific operations when the user selects it. For example, a button might change a task state, create a related record, or invoke custom server-side logic. UI Actions can support both client-side and server-side behavior depending on their configuration. Data Policies enforce data requirements, Dictionary Entries define field metadata, and Transform Maps handle imported data. UI Actions are therefore the appropriate mechanism for adding interactive actions to forms and lists.
Question 267
What is the primary purpose of a Scheduled Script Execution?
- To create table fields
- To run server-side scripts automatically at scheduled times
- To control form visibility
- To define reference qualifiers
Correct Answer: 2
Explanation
A Scheduled Script Execution allows a developer to run server-side JavaScript automatically according to a defined schedule. It can be configured to execute periodically, at a specific time, or according to another supported scheduling pattern. Scheduled scripts are useful for recurring maintenance tasks, data processing, cleanup activities, and automated business operations that do not require direct user interaction. Because they execute on the server, they can use server-side APIs such as GlideRecord. Developers should ensure scheduled scripts are efficient and properly constrained because poorly designed recurring jobs can consume system resources and negatively affect instance performance.
Question 268
Which API is specifically designed to perform aggregate database calculations such as counts and sums?
- GlideForm
- GlideUser
- GlideAggregate
- GlideAjax
Correct Answer: 3
Explanation
GlideAggregate is designed for performing database aggregation operations such as counts, sums, minimums, maximums, and averages. Instead of retrieving every matching record and calculating the result manually, developers can use GlideAggregate to ask the database to perform the aggregation. This can be more efficient for reporting or data-processing scenarios involving large numbers of records. GlideAggregate uses concepts similar to GlideRecord but provides aggregate functions and grouping capabilities. GlideForm is a client-side form API, GlideAjax facilitates client-to-server communication, and GlideUser provides information about the current user.
Question 269
Which ServiceNow feature allows a developer to define custom REST endpoints within an instance?
- REST Message
- Scripted REST API
- Import Set
- Transform Map
Correct Answer: 2
Explanation
A Scripted REST API allows developers to create custom REST endpoints within ServiceNow. Developers can define resources, HTTP methods, paths, request parameters, and server-side scripts that determine how incoming requests are processed. This is useful when external applications need to interact with custom business logic or data exposed by a ServiceNow application. A REST Message is primarily used for outbound integrations from ServiceNow to external services. Scripted REST APIs therefore focus on exposing ServiceNow functionality to external consumers through custom RESTful endpoints.
Question 270
Which method is generally used to save changes made to an existing GlideRecord?
- update()
- insert()
- query()
- initialize()
Correct Answer: 1
Explanation
The GlideRecord update() method is used to save changes made to an existing record. A developer typically queries or retrieves the record, modifies one or more fields, and then calls update() to write those changes back to the database. The insert() method is used for creating new records, while query() executes a database query. initialize() prepares a GlideRecord object for a new record. Developers should avoid unnecessary update operations because every database write can trigger Business Rules, workflows, flows, auditing, and other platform processing depending on the configuration.
Question 271
What does the current object generally represent inside a Business Rule?
- The currently processed record
- The logged-in user’s password
- The application menu
- The current update set
Correct Answer: 1
Explanation
Inside a Business Rule, the current object represents the record that is currently being processed. Developers use current to access and modify field values associated with that record. For example, a Business Rule can inspect current.state or assign a value to another field before the record is saved. The previous object can also be available in appropriate Business Rule contexts and represents the record’s previous values. Understanding current is fundamental to server-side Business Rule scripting because it provides direct access to the record involved in the database operation.
Question 272
Which ServiceNow feature is used to define dynamic behavior for fields on a form without requiring custom client-side scripting in many common cases?
- UI Policy
- Transform Map
- Scheduled Job
- Script Include
Correct Answer: 1
Explanation
UI Policies provide a declarative way to control field behavior on forms. They can make fields mandatory, visible, or read-only based on specified conditions. This can eliminate the need for custom Client Script code for many straightforward form requirements. UI Policies can also have UI Policy Actions that define what happens to individual fields. They are primarily intended for client-side form behavior and should not be confused with Data Policies, which can enforce requirements during data operations beyond a particular form. Using UI Policies where appropriate can make application configuration easier to maintain.
Question 273
Which ServiceNow object is commonly used to store reusable configuration values that administrators can change without modifying script code?
- System Property
- UI Action
- Import Set
- Reference Qualifier
Correct Answer: 1
Explanation
System Properties provide a convenient way to store configurable values that can be accessed by scripts and application components. They are useful when administrators need to change a setting without modifying and redeploying JavaScript code. For example, a system property might store a configurable threshold, feature setting, endpoint value, or other application configuration. Scripts can retrieve property values through appropriate GlideSystem methods. Using system properties for configuration helps separate business configuration from application logic and can make applications easier to maintain across different environments where values may differ.
Question 274
Which ServiceNow component is primarily responsible for sending automated email notifications based on defined conditions or events?
- Script Include
- Notification
- UI Policy
- Dictionary Entry
Correct Answer: 2
Explanation
A Notification is used to send automated communications to users when configured conditions or events occur. Notifications can be triggered by record conditions or by events generated within ServiceNow. Developers and administrators can configure recipients, email content, templates, and other notification settings. Events can also provide a flexible mechanism for triggering notifications from server-side scripts. Script Includes contain reusable server-side logic, UI Policies control form behavior, and Dictionary Entries define field metadata. Notifications are therefore a core ServiceNow feature for communicating record changes, approvals, assignments, and other business events to users.
Question 275
Which method can be used to add a condition to a GlideRecord query?
- addQuery()
- insert()
- update()
- deleteRecord()
Correct Answer: 1
Explanation
The GlideRecord addQuery() method is used to specify conditions that determine which records should be returned by a query. Developers can provide a field, an operator, and a value to create query conditions. Multiple addQuery() calls can be combined to narrow the result set. After the conditions are established, the query() method executes the database query. Using appropriate query conditions is important for performance because it prevents scripts from retrieving unnecessary records. The other methods listed perform database modifications rather than defining query criteria.
Question 276
What is the primary purpose of a Record Producer in ServiceNow?
- To create records in a target table through a simplified catalog-style interface
- To define database indexes
- To create application scopes
- To execute scheduled server scripts
Correct Answer: 1
Explanation
A Record Producer provides a catalog-style interface that allows users to submit information and create records in a specified target table. It is commonly used when users need a simplified way to create records without interacting directly with the standard form. Variables on the Record Producer collect information from the user, and scripts or mappings can use those values to populate fields on the generated record. Record Producers are frequently used in Service Catalog implementations to create incidents, requests, or custom application records. They differ from catalog items, which generally represent requests for goods, services, or fulfillment processes.
Question 277
Which API is primarily intended to provide information about the current logged-in user?
- GlideRecord
- GlideAggregate
- GlideUser
- GlideForm
Correct Answer: 3
Explanation
GlideUser provides methods for obtaining information about the currently logged-in user in server-side scripting contexts. Developers can use it to access information such as the user’s identity, roles, groups, and other user-related details supported by the API. It is useful when application logic needs to behave differently depending on the current user. GlideRecord is used for database records, GlideAggregate handles aggregate queries, and GlideForm provides client-side form manipulation. Using GlideUser can help implement user-specific behavior while keeping user-related logic separate from general record-query operations.
Question 278
Which ServiceNow mechanism can be used to trigger notifications or other event-driven processing from server-side scripts?
- Event
- Dictionary Entry
- UI Policy
- Form Layout
Correct Answer: 1
Explanation
ServiceNow Events provide an event-driven mechanism that can trigger notifications, Script Actions, and other processing. Server-side scripts can queue an event and provide parameters that can later be used by event-related components. This approach separates the code that detects an important business occurrence from the code that handles the resulting notification or processing. Events are useful when asynchronous or loosely coupled processing is desirable. For example, a Business Rule or other server-side script can generate an event when a particular record condition occurs, while a Notification can be configured to respond to that event.
Question 279
Which API is commonly used to make outbound REST requests from ServiceNow server-side scripts?
- GlideAjax
- RESTMessageV2
- GlideForm
- GlideAggregate
Correct Answer: 2
Explanation
RESTMessageV2 is a server-side API used to create and send outbound REST requests from ServiceNow. Developers can configure an endpoint, HTTP method, headers, parameters, and request body before sending the request. This makes RESTMessageV2 useful for integrations where ServiceNow needs to communicate with external applications or services. GlideAjax is primarily used for communication between client-side scripts and server-side Script Includes. GlideForm handles form interactions, while GlideAggregate performs aggregate database queries. Proper authentication, error handling, timeout configuration, and response processing should be considered when implementing outbound integrations.
Question 280
What is the main purpose of an Import Set in ServiceNow?
- To provide a staging area for imported data before transformation
- To control form field visibility
- To define user roles
- To create application menus
Correct Answer: 1
Explanation
An Import Set provides a staging area where data from an external source can be temporarily loaded before it is transformed into records in a target ServiceNow table. Import Sets are commonly used with data imported from files, databases, or external systems. After the data is loaded into the staging table, a Transform Map determines how the source fields should be mapped and processed for the destination table. This separation between staging and transformation allows developers to validate, transform, and control imported data before it reaches production tables. Import Sets are therefore an important part of ServiceNow data integration processes.