CAD Dumps

CAD Free Practice Test

ServiceNow CAD: Certified Application Developer-ServiceNow

QUESTION 31

In a Business Rule, which one of the following returns true if the currently logged in user has the admin role?

Correct Answer: B
Business Rule is server-side, so it uses GlideSystem API. gs.hasRoleExactly doesn't exist
In a Business Rule, the following returns true if the currently logged in user has the admin role:
✑ gs.hasRole(‘admin’). This is the correct answer because gs is the GlideSystem object, which provides methods for performing system operations, and hasRole is a method that checks if the current user has the specified role. For example, gs.hasRole(‘admin’) will return true if the current user has the admin role, and false otherwise.
The following do not return true if the currently logged in user has the admin role in a Business Rule:
✑ g_form.hasRoleExactly(‘admin’). This is not correct because g_form is the
GlideForm object, which provides methods for manipulating forms, and hasRoleExactly is a method that checks if the current user has exactly the specified role and no other roles. For example, g_form.hasRoleExactly(‘admin’) will return true if the current user has only the admin role, and false if the current user has the admin role and any other role.
✑ g_form.hasRole(‘admin’). This is not correct because g_form is the GlideForm
object, which provides methods for manipulating forms, and hasRole is a method
that checks if the current user has the specified role or any role that contains the specified role. For example, g_form.hasRole(‘admin’) will return true if the current user has the admin role or any role that contains the admin role, such as admin_ui or admin_script.
✑ gs.hasRoleExactly(‘admin’). This is not correct because gs is the GlideSystem
object, which provides methods for performing system operations, and hasRoleExactly is not a valid method of the gs object. There is no method that checks if the current user has exactly the specified role and no other roles in the gs object. References: Business Rules, GlideSystem, GlideForm

QUESTION 32

What are Application Files in a ServiceNow application?

Correct Answer: B
Application Files are ServiceNow artifacts comprising an application. An application is a group of files and data that work together to provide a service or functionality. An application file is a specific type of file that belongs to an application, such as a table, a script, a form, a business rule, a UI action, etc. Application files define the structure, logic, and interface of the application. An XML export of an application’s table records, XML exports of an application’s Update Set, and CSV files containing data imported into an application are not examples of application files, as they are data formats that can be used to transfer or store information related to an application, but not the application itself. Reference: Application Files