ServiceNow CAD Practice Test - Questions Answers, Page 6
List of questions
Question 51
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
Which one of the following is NOT a method used for logging messages in a server-side script for a privately- scoped application?
Explanation:
gs.print() and gs.log() are older and not available in scoped applications, whereas gs.debug(), gs.info(), gs.warn(), gs.error() work in both scoped applications and global are therefore are more versatile going forward in future versions.
Question 52
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
If the Create module field is selected when creating a table, what is the new module's default behavior?
Explanation:
When creating a table, the Create module field allows you to automatically create a module for the table in the application menu. The default behavior of the new module is to display a list of all records from the table. This can be changed later by editing the module properties and specifying a different link type, such as form, URL, or script.
References:
Create a table
Module properties
Question 53
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
How must Application Access be configured to prevent all other private application scopes from creating configuration records on an application's data tables?
Explanation:
Application Access is a feature that allows you to control the access level of other application scopes to your application's data tables. By setting the Accessible from field value to This application scope only, you can restrict the access to your data tables to only your application scope. This means that other application scopes cannot create, read, write, or delete records on your data tables, unless they have explicit permissions through Access Controls or other means.
References:
Application Access
[Application scope]
https://developer.servicenow.com/dev.do#!/learn/learning-plans/rome/new_to_servicenow/app_store_learnv2_securingapps_rome_application_access
https://docs.servicenow.com/bundle/rome-application-development/page/build/applications/concept/c_ExampleDenyingAllDesignAccess.html
Question 54
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
What are some of the benefits of extending an existing table such as the Task table when creating a new application?
a) You can repurpose existing fields by simply changing the label.
b) Use existing fields with no modifications.
c) Existing logic from the parent table will be automatically applied to the new table.
d) All of the parent table records are copied to the new table.
Explanation:
Extending an existing table such as the Task table when creating a new application has several benefits, such as:
You can repurpose existing fields by simply changing the label. For example, you can change the Short description field to Summary or Title for your new table.
You can use existing fields with no modifications. For example, you can use the Assigned to, Priority, and State fields for your new table without changing anything.
Existing logic from the parent table will be automatically applied to the new table. For example, you can inherit the Business Rules, Client Scripts, and UI Policies from the Task table for your new table.
The only option that is not true is d) All of the parent table records are copied to the new table. Extending a table does not copy any records from the parent table to the new table. It only creates a new table that inherits the fields and logic from the parent table.
References:
[Extend a table]
[Task table]
Question 55
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
When configuring an Access Control which has no condition or script, which one of the following statements is NOT true?
Explanation:
Access Controls are rules that define who can access what data and how they can access it. When configuring an Access Control, you can specify the table, operation, and role for the rule. You can also add a condition or a script to further refine the rule. If you do not add a condition or a script, the rule will apply to all records and fields on the table.
The statements A, B, and C are true for Access Controls that have no condition or script. For example:
table.* will grant access to every field in a record. This means that the user can view and edit all the fields on the record, regardless of their role or any other criteria.
table.None will grant access to every record on the table. This means that the user can view and edit all the records on the table, regardless of their role or any other criteria.
table.field will grant access to a specific field in a record. This means that the user can view and edit only that field on the record, regardless of their role or any other criteria.
The statement D is not true for Access Controls that have no condition or script. table.id will not grant access to a specific record on the table. This is because the id is not a field name, but a unique identifier for the record. To grant access to a specific record on the table, you need to add a condition or a script that matches the id of the record.
References:
[Access Control rules]
[Create an Access Control rule]
Question 56
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
Which of the following methods are useful in Access Control scripts?
Explanation:
Access Control scripts are server-side scripts that run when an Access Control rule is evaluated. They can use the gs and current objects to access the GlideSystem and GlideRecord methods, respectively. Some of the useful methods in Access Control scripts are:
gs.hasRole() - This method checks if the current user has a specified role. It returns true if the user has the role, and false otherwise. For example, gs.hasRole('admin') will return true if the user is an administrator, and false otherwise.
current.isNewRecord() - This method checks if the current record is a new record that has not been inserted into the database yet. It returns true if the record is new, and false otherwise. For example, current.isNewRecord() will return true if the record is being created, and false if the record is being updated or deleted.
The methods g_user.hasRole() and current.isNew() are not part of the server-side scripting API. They are part of the client-side scripting API, which is used in Client Scripts and UI Policies. They cannot be used in Access Control scripts.
References:
[Access Control scripts]
[GlideSystem methods]
[GlideRecord methods]
Question 57
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
Which one of the following client-side scripts apply to Record Producers?
Explanation:
Catalog Client Scripts and Catalog UI Policies are the client-side scripts that apply to Record Producers. Catalog Client Scripts allow you to add or modify functionality on a catalog item or record producer form. Catalog UI Policies dynamically change information on a catalog item or record producer form. UI Scripts, UI Actions, Client Scripts, and UI Policies do not apply to Record Producers.
Reference:Catalog client scripts,Catalog UI policies
Question 58
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
When a ServiceNow instance requests information from a web service, ServiceNow is the web service:
Explanation:
When a ServiceNow instance requests information from a web service, ServiceNow is the web service consumer. A web service consumer is an application that sends requests to a web service provider and receives responses from it. A web service provider is an application that exposes its functionality as web services. A web service publisher is a person or organization that publishes web services for others to use. A web service specialist is a person who has expertise in developing or using web services.
Reference:Web services
Question 59
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
Which one of the following is the fastest way to create and configure a Record Producer?
Explanation:
The fastest way to create and configure a Record Producer is to open the table in the Table records and select the Add to Service Catalog Related Link. This will automatically create a Record Producer with the same fields as the table and add it to the Service Catalog. You can then modify the Record Producer as needed. The other options require more steps and manual configuration.
Reference:Create a record producer
Question 60
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
Which objects can you use in a Scheduled Script Execution (Scheduled Job) script?
Explanation:
https://developer.servicenow.com/dev.do#!/learn/learning-plans/quebec/servicenow_administrator/app_store_learnv2_automatingapps_quebec_scheduled_script_execution_scripts
The objects that you can use in a Scheduled Script Execution (Scheduled Job) script are GlideSystem and GlideRecord. GlideSystem provides methods for performing system operations, such as logging, running background scripts, or getting system information. GlideRecord provides methods for working with records in the database, such as querying, updating, inserting, or deleting records. The current object is not available in Scheduled Script Execution scripts, as it refers to the current record on a form or list. The GlideUser object is also not available, as it refers to the current user session.
Reference:Scheduled Script Execution,GlideSystem,GlideRecord
Question