View Full ServiceNow CAD Exam Dumps and Practice Test Dumps.
Question 381
Which ServiceNow feature is primarily used to control which records and fields users can access?
- UI Policy
- Business Rule
- Access Control List (ACL)
- Client Script
Correct Answer: 3
Explanation
Access Control Lists (ACLs) are the primary security mechanism in ServiceNow for controlling access to records and fields. An ACL can define whether a user is allowed to perform operations such as create, read, write, or delete. ACL conditions and scripts can evaluate roles, users, and record information before granting access. Table-level ACLs control access to records, while field-level ACLs can restrict individual fields. UI Policies and Client Scripts can change the user interface, but they should not be considered the main security mechanism because client-side logic can be bypassed. Therefore, ACLs provide the appropriate server-side authorization layer for protecting application data.
Question 382
Which method is commonly used with GlideRecord to retrieve a single record using its sys_id?
- get()
- next()
- query()
- fetch()
Correct Answer: 1
Explanation
The GlideRecord get() method is commonly used when a script needs to retrieve one specific record, especially when the sys_id is known. For example, gr.get(‘sys_id’) attempts to load the corresponding record into the GlideRecord object. The query() method executes a query and is normally followed by next() to iterate through returned records. The next() method moves the GlideRecord pointer to the next result. fetch() is not the standard GlideRecord method for retrieving a ServiceNow record. Using get() is therefore the most direct approach when the objective is to retrieve a specific record by its unique identifier.
Question 383
Which Client Script type executes when a user changes the value of a field on a form?
- onLoad
- onSubmit
- onDisplay
- onChange
Correct Answer: 4
Explanation
An onChange Client Script runs when the value of a specified field changes on a form. It is useful when the application needs to respond dynamically to user input. For example, changing a category field could cause another field to become mandatory or update its available choices. An onLoad Client Script runs when the form loads, while an onSubmit Client Script executes when the user attempts to submit the form. onDisplay is not one of the standard Client Script types. Client Scripts primarily operate in the browser, so they are useful for improving form behavior and user experience rather than enforcing server-side security.
Question 384
What is the primary purpose of a Transform Map in an Import Set process?
- To define how imported data is transformed into target table records
- To create application roles automatically
- To control form visibility
- To schedule database backups
Correct Answer: 1
Explanation
A Transform Map defines how data from an Import Set table is mapped and transformed into records in a target ServiceNow table. It specifies source-to-target field mappings and can include transformation scripts, field actions, and coalesce configuration. During the transformation process, ServiceNow uses these rules to determine how imported information should be inserted or updated. Transform Maps are therefore an important part of data migration and integration workflows. They do not primarily manage form visibility, application roles, or database backups. When importing external data into ServiceNow, administrators and developers use Transform Maps to control how the incoming data is processed and stored in the target table.
Question 385
Which server-side API is commonly used to perform aggregate calculations such as COUNT or SUM?
- GlideRecord
- GlideAggregate
- GlideForm
- GlideUser
Correct Answer: 2
Explanation
GlideAggregate is designed for performing database aggregation operations in ServiceNow. It can calculate values such as COUNT, SUM, MIN, MAX, and AVG and can group results when required. For example, a developer can use GlideAggregate to count incidents by priority without retrieving every individual incident record into memory. GlideRecord is primarily used for querying and manipulating individual records. GlideForm is a client-side API used for controlling forms, while GlideUser provides information about the current user. Using GlideAggregate can also improve efficiency because aggregation is performed by the database rather than requiring the script to process every record individually.
Question 386
What is the main purpose of a Script Include?
- To define database indexes
- To configure form layouts
- To store reusable server-side JavaScript logic
- To create application menus
Correct Answer: 3
Explanation
A Script Include is used to store reusable server-side JavaScript code in ServiceNow. Developers commonly place functions or classes in Script Includes so the same logic can be called from multiple server-side scripts. This improves maintainability and reduces duplication. Script Includes can also be configured as client-callable when appropriate, allowing client-side scripts to communicate with server-side logic through mechanisms such as GlideAjax. Script Includes are not intended primarily for defining database indexes, configuring form layouts, or creating application menus. Properly designed Script Includes help organize application logic and support reusable, modular development within ServiceNow applications.
Question 387
Which Business Rule timing is generally appropriate when a record must be modified before it is written to the database?
- After
- Async
- Display
- Before
Correct Answer: 4
Explanation
A Before Business Rule runs before the current record is saved to the database. This makes it suitable when a developer needs to modify field values before the insert or update operation completes. For example, a Before Business Rule can calculate a value or populate a field based on information in the current record. After Business Rules execute after the database operation, while Async Business Rules execute asynchronously after the transaction and are useful for work that does not need to delay the user transaction. Display Business Rules run when a record is being prepared for display. Therefore, Before timing is appropriate when changes need to be applied before database storage.
Question 388
Which ServiceNow object is commonly used to access and manipulate form fields from a Client Script?
- GlideSystem
- GlideRecord
- GlideForm
- GlideAggregate
Correct Answer: 3
Explanation
GlideForm, commonly accessed through the g_form object, is the primary client-side API for interacting with fields and forms. It provides methods for setting field values, making fields mandatory, hiding or displaying fields, disabling controls, showing messages, and performing other form-related operations. GlideRecord is primarily a server-side API for database operations. GlideSystem, accessed through gs, provides server-side system functionality, while GlideAggregate is designed for database aggregation. Because Client Scripts run in the browser and need to manipulate the form interface, g_form is the appropriate API for these tasks.
Question 389
What does the coalesce option in a Transform Map primarily determine?
- Which fields can be displayed on a form
- How the system identifies an existing target record for update
- Which users can access the import set
- When a scheduled job runs
Correct Answer: 2
Explanation
Coalesce fields are used during data transformation to determine whether an incoming record matches an existing record in the target table. When the values of the designated coalesce fields match an existing target record, ServiceNow can update that record instead of creating a new one. If no matching record is found, the transformation can create a new target record depending on the configuration. This mechanism is particularly useful when importing data repeatedly from an external system and avoiding unwanted duplicate records. Coalesce does not control form fields, user permissions, or scheduled execution. It primarily helps determine whether imported data should result in an insert or update.
Question 390
Which API is commonly used in a Client Script to make a field mandatory?
- g_form.setMandatory()
- gs.setMandatory()
- gr.setMandatory()
- GlideUser.setMandatory()
Correct Answer: 1
Explanation
The g_form.setMandatory() method is used in client-side scripting to dynamically make a form field mandatory or non-mandatory. For example, a Client Script can use g_form.setMandatory(‘description’, true) when a particular condition requires the user to provide a description. The g_form object represents the current form and provides many methods for controlling field behavior. gs is the GlideSystem object used mainly in server-side scripts, while GlideRecord is used for database interaction. GlideUser is not the standard API for controlling field mandatory behavior. Therefore, g_form.setMandatory() is the appropriate method for this requirement.
Question 391
Which ServiceNow feature allows developers to package application changes so they can be moved between instances?
- UI Policies
- Update Sets
- Client Scripts
- Reference Qualifiers
Correct Answer: 2
Explanation
Update Sets are used to capture many configuration and development changes made in a ServiceNow instance so they can be transferred to another instance. They are commonly used when moving application customizations from a development environment to a test or production environment. Changes such as Business Rules, Client Scripts, UI Policies, and other configuration records may be captured depending on the type of change and configuration. Update Sets should be reviewed and tested before being committed and moved to another environment. They are not simply a runtime feature; they provide a controlled mechanism for transporting configuration changes between instances.
Question 392
Which method advances a GlideRecord object to the next record returned by a query?
- move()
- advance()
- next()
- forward()
Correct Answer: 3
Explanation
The next() method is used with GlideRecord to move to the next record in the result set after a query has been executed. A common server-side pattern is to create a GlideRecord object, add query conditions, execute query(), and then use while (gr.next()) to process each returned record. Each successful call to next() positions the GlideRecord object on another record. Methods such as move(), advance(), and forward() are not the standard methods used for iterating through GlideRecord query results. Understanding this pattern is fundamental for ServiceNow server-side scripting and database record processing.
Question 393
Which ServiceNow feature is specifically designed to automate processes using a low-code/no-code approach?
- Flow Designer
- Dictionary Entries
- Form Layouts
- Database Views
Correct Answer: 1
Explanation
Flow Designer provides a low-code/no-code environment for automating business processes in ServiceNow. Developers and administrators can create flows using triggers, actions, conditions, and other components without writing large amounts of custom JavaScript. Flow Designer can automate tasks such as updating records, sending notifications, requesting approvals, and interacting with other ServiceNow capabilities. Subflows and custom actions can also be created for reusable automation logic. Dictionary Entries define field metadata, Form Layouts control form presentation, and Database Views combine data from multiple tables for reporting or querying. Therefore, Flow Designer is the ServiceNow feature most directly associated with process automation using a low-code approach.
Question 394
Which method is used to insert a new record using GlideRecord?
- save()
- create()
- add()
- insert()
Correct Answer: 4
Explanation
The GlideRecord insert() method creates a new record in the database. A developer typically initializes a GlideRecord object for the required table, assigns values using methods such as setValue(), and then calls insert(). For example, a script can set fields on a GlideRecord object and call insert() to save the new record. The method may return the sys_id of the inserted record when the operation succeeds. update() is instead used to save changes to an existing record. Methods such as save() and create() are not the standard GlideRecord methods used for this purpose. Thus, insert() is the correct choice for creating a new record.
Question 395
What is the primary purpose of a Reference Qualifier?
- To restrict the records available for selection in a reference field
- To create a new database table
- To execute a scheduled script
- To define user roles
Correct Answer: 1
Explanation
A Reference Qualifier controls which records are available for selection in a reference field. It can apply conditions so users see only relevant records when selecting a referenced record. For example, a reference field might display only active users belonging to a particular department. Reference Qualifiers can be static or dynamic depending on the requirement. They are useful for improving usability and ensuring that reference fields present appropriate choices. They do not create tables, define roles, or schedule scripts. Although a Reference Qualifier can improve data selection, it should not be confused with an ACL because ACLs are responsible for controlling access to data.
Question 396
Which GlideRecord method is used to modify an existing record after changing its field values?
- update()
- insert()
- query()
- next()
Correct Answer: 1
Explanation
The GlideRecord update() method saves changes made to an existing record. Typically, a developer retrieves a record, changes one or more fields with methods such as setValue(), and then calls update() to persist those changes to the database. insert() creates a new record rather than modifying an existing one. query() executes a database query and does not itself save changes, while next() moves through query results. Developers should use update carefully, particularly when processing many records, because unnecessary database updates can affect performance. Proper query conditions and validation help ensure that only intended records are modified.
Question 397
Which Client Script type is executed when a form is initially loaded?
- onSubmit
- onChange
- onLoad
- onCellEdit
Correct Answer: 3
Explanation
An onLoad Client Script executes when a form is loaded in the user’s browser. It is commonly used to initialize form behavior based on the current record or user context. For example, an onLoad script might hide a field, display a message, or adjust a field’s behavior when the form opens. An onChange script runs when a specific field value changes, while onSubmit executes when the user attempts to submit the form. onCellEdit is not a standard Client Script type for normal form loading. Therefore, onLoad is the appropriate choice when behavior must occur as soon as the form is opened.
Question 398
Which ServiceNow object provides information about the currently logged-in user in server-side scripts?
- GlideForm
- GlideUser
- GlideRecord
- GlideAggregate
Correct Answer: 2
Explanation
GlideUser provides information and functionality related to the current user in ServiceNow scripting. It can be used to work with information such as the user’s identity, roles, groups, and other user-related properties depending on the API and context. Developers often use current-user information when implementing business logic that depends on who is performing an operation. GlideForm is primarily client-side and handles form interactions, while GlideRecord is used for database operations. GlideAggregate performs database aggregation. Understanding the distinction between these APIs helps developers select the appropriate object for a particular server-side scripting requirement.
Question 399
What is the main purpose of a Dictionary Entry in ServiceNow?
- To schedule integrations
- To define metadata and configuration for a table field
- To send email notifications
- To execute Business Rules
Correct Answer: 2
Explanation
A Dictionary Entry stores metadata and configuration information about a field in a ServiceNow table. It can define properties such as the field’s data type, length, default value, reference table, mandatory behavior, and other characteristics depending on the field and configuration. Dictionary Entries form an important part of ServiceNow’s data model because they describe how fields behave and are represented. They are not primarily responsible for scheduling integrations, sending notifications, or executing Business Rules. Developers and administrators may inspect Dictionary Entries when troubleshooting field behavior or understanding how a table’s fields are configured.
Question 400
Which API is commonly used to make a server-side Script Include callable from a Client Script?
- GlideRecord
- GlideAggregate
- GlideAjax
- GlideDateTime
Correct Answer: 3
Explanation
GlideAjax enables client-side scripts to communicate with server-side Script Includes. A Script Include must be configured appropriately, including being client callable when required, so that the client can invoke its server-side functionality. This approach is useful when a Client Script needs information that should be retrieved or calculated on the server. For example, a client script can send parameters through GlideAjax and receive a response from a Script Include. GlideRecord and GlideAggregate are primarily server-side database APIs, while GlideDateTime handles date and time operations. GlideAjax therefore provides the appropriate communication mechanism between client-side scripts and callable server-side Script Includes.