View Full ServiceNow CAD Exam Dumps and Practice Test Dumps.
Question 241
Which ServiceNow object is primarily used to define reusable server-side logic that can be called from other server-side scripts?
- UI Policy
- Script Include
- Client Script
- UI Action
Correct Answer: 2
Explanation
A Script Include is designed to store reusable server-side JavaScript logic in ServiceNow. Instead of writing the same functionality repeatedly in Business Rules, Scripted REST APIs, or other server-side components, developers can place the logic inside a Script Include and call it when required. Script Includes can contain functions, classes, or utility methods. They execute on the server and can also be configured as client-callable when used with GlideAjax. Proper use of Script Includes improves application maintainability, reduces duplicated code, and provides a centralized location for commonly used business logic.
Question 242
Which method is commonly used with GlideRecord to retrieve a single record using its sys_id?
- get()
- query()
- next()
- addQuery()
Correct Answer: 1
Explanation
The GlideRecord get() method is commonly used when a developer needs to retrieve a specific record using its unique sys_id or another uniquely identifying field. For example, gr.get(sys_id) retrieves the corresponding record and positions the GlideRecord object on that record. This differs from query(), which executes a query that can return multiple records. The next() method is then generally used to iterate through records returned by a query. Using get() is convenient when the exact record is already known and only one record needs to be accessed.
Question 243
Which Client Script type executes when a user changes the value of a field on a form?
- onLoad
- onSubmit
- onChange
- onCellEdit
Correct Answer: 3
Explanation
An onChange Client Script executes when the value of a specified field changes on a form. Developers commonly use it to dynamically respond to user input, such as making another field mandatory, changing a field’s visibility, setting a default value, or validating related information. The script can use the g_form object to manipulate fields on the current form. An onLoad Client Script runs when the form loads, while an onSubmit Client Script runs when the user attempts to submit the form. Choosing the correct Client Script type helps ensure the desired behavior occurs at the appropriate point.
Question 244
What is the main purpose of a Transform Map in ServiceNow?
- To control user authentication
- To create UI buttons
- To define field mappings between an import set and a target table
- To schedule recurring scripts
Correct Answer: 3
Explanation
A Transform Map defines how data from an Import Set is transformed and loaded into a target ServiceNow table. It can map source fields to target fields and can also contain transformation logic, scripts, and coalesce settings. During the transformation process, ServiceNow uses the Transform Map to determine how imported data should be processed. This makes Transform Maps especially useful when importing information from external systems or files such as CSV data. Import Sets provide the staging area, while Transform Maps determine how that staged data is converted into records in the destination table.
Question 245
Which object provides methods for manipulating the current form from a Client Script?
- GlideRecord
- GlideSystem
- GlideForm
- GlideAggregate
Correct Answer: 3
Explanation
GlideForm, commonly accessed through the g_form object, provides client-side methods for interacting with the current ServiceNow form. Developers can use it to set field values, make fields mandatory, hide or display fields, disable fields, show messages, and perform other form-related operations. GlideForm runs in the browser and is therefore primarily associated with Client Scripts and other client-side components. GlideRecord, in contrast, is primarily a server-side API for querying and manipulating database records. Understanding the distinction between client-side APIs such as GlideForm and server-side APIs such as GlideRecord is important for ServiceNow application development.
Question 246
What is the primary purpose of an Access Control (ACL) rule?
- To control access to data and operations
- To import external data
- To create scheduled jobs
- To define application navigation
Correct Answer: 1
Explanation
Access Control rules, commonly called ACLs, determine whether users can access specific ServiceNow resources and perform particular operations. ACLs can control access at different levels, including tables, records, fields, and operations such as read, write, create, and delete. ServiceNow evaluates applicable ACL rules when determining whether a user is allowed to perform an action. Roles, conditions, and scripts can be involved in ACL evaluation. ACLs are an important part of application security because they help ensure users can only access or modify information for which they have appropriate permissions.
Question 247
Which API is commonly used to perform database queries and manipulate records on the ServiceNow server?
- GlideForm
- GlideRecord
- GlideAjax
- GlideUser
Correct Answer: 2
Explanation
GlideRecord is the primary server-side API used to interact with records stored in ServiceNow tables. Developers can use GlideRecord to query records, insert new records, update existing records, and delete records. Common methods include addQuery(), query(), next(), insert(), update(), and deleteRecord(). GlideRecord should generally be used carefully because inefficient database queries can affect application performance. Developers should apply appropriate query conditions and avoid unnecessary database operations. GlideForm is used for client-side form manipulation, while GlideAjax is primarily used to communicate from client-side scripts to server-side Script Includes.
Question 248
What does the coalesce option in a Transform Map determine?
- Which fields appear on a form
- Which users receive notifications
- How application scopes are created
- How incoming records are matched to existing records
Correct Answer: 4
Explanation
Coalescing in a Transform Map determines how incoming import data is matched against existing records in the target table. When a field is marked as a coalesce field, ServiceNow uses that field to determine whether an imported row corresponds to an existing record. If a matching record is found, the existing record can be updated. If no match is found, a new record can be inserted, depending on the transformation configuration. Coalescing is particularly useful when importing data repeatedly from external systems because it helps prevent unnecessary duplicate records and allows existing records to be maintained.
Question 249
Which Business Rule type executes after a database operation has been completed?
- Before
- Display
- After
- Async
Correct Answer: 3
Explanation
An After Business Rule executes after the database operation has been completed. It is commonly used when a developer needs to perform additional server-side processing based on a record that has already been inserted, updated, or deleted. Before Business Rules execute before the database action and are often used to modify values before they are saved. Async Business Rules execute asynchronously after the database operation, allowing processing to occur without making the user wait for completion. Display Business Rules execute when a record is being prepared for display and are commonly used to make server-side information available to client-side scripts.
Question 250
Which ServiceNow component is used to create custom buttons, links, or menu items on forms and lists?
- UI Action
- UI Policy
- Dictionary Entry
- Data Policy
Correct Answer: 1
Explanation
A UI Action is used to create interactive buttons, links, and menu items within ServiceNow forms and lists. UI Actions can execute server-side or client-side scripts depending on their configuration. For example, a developer could create a button that changes a record’s state, creates a related record, or performs a custom operation. UI Policies are instead used to dynamically control form field behavior, while Dictionary Entries define metadata about fields. Data Policies enforce data requirements during record operations. UI Actions therefore provide a flexible mechanism for adding custom user interactions to ServiceNow applications.
Question 251
Which method executes a GlideRecord query after query conditions have been defined?
- next()
- query()
- insert()
- initialize()
Correct Answer: 2
Explanation
The GlideRecord query() method executes the database query after query conditions have been established. Developers commonly use addQuery() to specify conditions and then call query() to retrieve matching records. Once the query has executed, the next() method is normally used to iterate through the returned records. For example, a script can create a GlideRecord object, add a condition, execute query(), and then process each matching record with next(). Understanding this sequence is fundamental to writing effective server-side ServiceNow scripts and helps developers retrieve only the records needed for processing.
Question 252
What is the primary purpose of a ServiceNow application scope?
- To increase database storage
- To automatically create users
- To define application boundaries and control access to application artifacts
- To replace all ACLs
Correct Answer: 3
Explanation
Application scope establishes boundaries around an application and its artifacts in ServiceNow. It helps identify which application owns tables, scripts, modules, and other components. Scope also provides protection between applications and controls how application artifacts can be accessed across scope boundaries. Cross-scope access may require explicit permissions or configuration. Application scope is therefore important for developing modular applications and preventing unintended interference between different applications. It does not replace ACLs, because ACLs continue to control user access to data and operations. Scope primarily concerns application boundaries and artifact ownership rather than end-user authorization.
Question 253
Which ServiceNow feature allows developers to package application changes for movement between instances?
- Update Set
- UI Policy
- Data Lookup
- Reference Qualifier
Correct Answer: 1
Explanation
Update Sets are commonly used to capture configuration changes made in one ServiceNow instance so those changes can be moved to another instance. Developers can create an update set, make application configuration changes, complete the update set, and then transfer it to another instance for testing or deployment. Update Sets can capture many configuration records, but not every type of data or configuration should automatically be assumed to be included. Developers should review captured changes before deployment. Proper update-set management helps maintain controlled development and promotion processes across development, test, and production environments.
Question 254
Which API is commonly used with GlideAjax to retrieve server-side information from a client-side script?
- GlideAggregate
- GlideForm
- GlideRecordSecure
- Script Include
Correct Answer: 4
Explanation
GlideAjax is commonly used when a client-side script needs to communicate with server-side logic. The server-side logic is typically placed in a Script Include configured to be client callable. The Client Script creates a GlideAjax request, passes parameters, and requests the server-side function. The Script Include processes the request and returns the required information. This approach allows developers to retrieve server-side information without directly using GlideRecord from the browser. It is useful for dynamically retrieving data, validating information, or calculating values that require server-side access while keeping database operations on the server.
Question 255
What does a Reference Qualifier primarily control?
- Which records are available for selection in a reference field
- Which users can log into ServiceNow
- Which Business Rules execute first
- Which tables can be extended
Correct Answer: 1
Explanation
A Reference Qualifier controls which records are available for selection in a reference field. It applies filtering conditions to the referenced table so users see only relevant records. For example, a reference field for selecting a user could be configured to show only active users belonging to a particular department. Reference Qualifiers can be static, dynamic, or scripted depending on the application’s requirements. They improve usability and data quality by preventing users from selecting irrelevant records. However, a Reference Qualifier should not be treated as a replacement for security controls such as ACLs.
Question 256
Which Flow Designer component is designed to provide a reusable sequence of automation that can be called from multiple flows?
- Trigger
- Subflow
- Data Pill
- Condition
Correct Answer: 2
Explanation
A Subflow in Flow Designer provides a reusable sequence of actions that can be invoked from multiple flows or other automation. This allows developers to avoid duplicating the same sequence of actions across different flows. A Subflow can accept inputs and produce outputs, making it suitable for reusable business processes. For example, a common approval or notification process could be implemented once as a Subflow and then reused in multiple flows. This improves maintainability because changes to shared logic can be made in one location rather than requiring developers to modify multiple independent flows.
Question 257
Which method is used to create a new record with GlideRecord?
- insert()
- update()
- query()
- next()
Correct Answer: 1
Explanation
The GlideRecord insert() method creates a new record in the target ServiceNow table. Typically, a developer first creates a GlideRecord object, calls initialize(), sets the required field values, and then calls insert(). The update() method is generally used to save changes to an existing record rather than create a new one. query() retrieves records, while next() moves through records returned by a query. Developers should ensure that required fields and appropriate values are supplied before calling insert() so that the new record can be created successfully.
Question 258
Which Client Script type is intended to run when a form is initially loaded?
- onChange
- onSubmit
- onLoad
- onCellEdit
Correct Answer: 3
Explanation
An onLoad Client Script executes when a ServiceNow form is initially loaded. It is commonly used to configure the form based on the current record, user information, or other client-side conditions. For example, an onLoad script might hide a field, set a field value, or display a message when the form opens. An onChange script responds to changes in a particular field, while an onSubmit script executes when the user attempts to save the form. Choosing the correct Client Script type ensures that client-side logic executes at the appropriate stage of the user’s interaction with the form.
Question 259
Which ServiceNow feature is specifically designed to enforce field requirements and conditions for data operations across different interfaces?
- UI Action
- Data Policy
- UI Macro
- Application Menu
Correct Answer: 2
Explanation
A Data Policy is used to enforce data requirements and conditions when records are created or updated. Unlike a UI Policy, which primarily controls behavior on a form, a Data Policy can help enforce requirements beyond a particular user interface. This makes Data Policies useful when consistent data requirements need to be applied across different methods of entering or updating information. For example, a field can be required when certain conditions are met. Data Policies contribute to data consistency and quality while UI Policies are more focused on dynamically controlling field behavior on forms.
Question 260
Which ServiceNow API provides access to system-level functions such as logging messages and retrieving system information?
- GlideForm
- GlideRecord
- GlideSystem
- GlideAggregate
Correct Answer: 3
Explanation
GlideSystem, commonly accessed through the gs object, provides server-side methods for interacting with the ServiceNow system environment. Developers use GlideSystem for functions such as logging messages, obtaining user information, checking roles, generating messages, and accessing various system-level utilities. Common examples include gs.info(), gs.error(), gs.getUser(), and gs.hasRole(). GlideSystem is different from GlideRecord, which focuses on database records, and GlideForm, which operates on forms in the client. Understanding GlideSystem is important because many server-side scripts rely on its methods for system interaction and debugging.