Free CAD Exam Braindumps (page: 5)

Page 5 of 70

Which one of the following is true?

  1. A UI Policy's Actions execute before the UI Policy's Scripts
  2. The execution order for a UI Policy's Scripts and Actions is determined at runtime
  3. A UI Policy's Scripts execute before the UI Policy's Actions
  4. A UI Policy's Actions and Scripts execute at the same time

Answer(s): A

Explanation:

Created UI policy on incident form, action set's cmdb_ci field as mandatory and script as not. result, field was not mandatory.

A UI Policy's Actions execute before the UI Policy's Scripts. Actions are predefined operations that can be applied to fields or sections, such as making them mandatory, read-only, visible, or setting a default value. Scripts are custom JavaScript code that can be used to perform more complex logic or validations. Actions are executed first, and then Scripts are executed if the UI Policy conditions are met.


Reference:

[ServiceNow Docs - UI policy actions], [ServiceNow Docs - UI policy scripts]



Here is the Business Rule script template:



This type of JavaScript function is known as:

  1. Constructor
  2. Scoped
  3. Anonymous
  4. Self-invoking

Answer(s): D

Explanation:

Self-invoking. Learn JavaScript!

This type of JavaScript function is known as self-invoking or immediately-invoked function expression (IIFE). It is a function that is defined and executed at the same time, without being assigned to a variable or being called by another function. It is often used to create a local scope for variables and avoid polluting the global namespace.


Reference:

[W3Schools - JavaScript Function Definitions], [MDN Web Docs - Immediately-invoked function expressions]



Which method call returns true only if the currently logged in user has the catalog_admin role and in no other case?

  1. g_user.hasRole(`catalog_admin')
  2. g_user.hasRoleExactly(`catalog_admin')
  3. g_user.hasRoleOnly(`catalog_admin')
  4. g_user.hasRoleFromList(`catalog_admin')

Answer(s): B

Explanation:

The method call that returns true only if the currently logged in user has the catalog_admin role and in no other case is g_user.hasRoleExactly(`catalog_admin'). This method checks if the user has exactly one role, and returns true if it matches the argument. The other methods return true if the user has one or more roles, or if the user has any role from a list of arguments.


Reference:

[ServiceNow Docs - GlideUser API], [ServiceNow Community - Difference between hasRole() and hasRoleExactly()]


https://community.servicenow.com/community? id=community_QUESTION NO :&sys_id=dff705e6db7757c0d58ea345ca96196b



There is a basic strategy when creating a Utils Script Include. Identify the step that does not belong.

  1. Identify the table
  2. Script the function(s)
  3. Create a class
  4. Create a prototype object from the new class

Answer(s): A

Explanation:

The step that does not belong when creating a Utils Script Include is identifying the table. A Script Include is a server-side script that can contain one or more classes or functions that can be reused by other scripts. It does not depend on a specific table, but can access any table through GlideRecord or other APIs. The other steps are part of creating a Script Include class and its prototype object.


Reference:

[ServiceNow Docs - Script Includes], [ServiceNow Docs - GlideRecord API]



Page 5 of 70



Post your Comments and Discuss ServiceNow® CAD exam with other Community members:

Jeff commented on October 01, 2024
Question 11 is Form Choice (Answer D) - explanation is examining the answer
CANADA
upvote

Sravani commented on September 01, 2024
Gud practice
UNITED STATES
upvote

vikas commented on August 29, 2024
Very useful
Anonymous
upvote

Bimal commented on July 15, 2024
I am returning user of this site. They provide accurate and useful study guides and give a good discount.
INDIA
upvote

Pooja commented on July 04, 2024
Very useful
Anonymous
upvote

Samantha commented on May 03, 2024
Managed to pass this exam. The exam is extremely hard. So you need to study these questions and memorize all of them in order to pass.
UNITED STATES
upvote

Revanthi commented on January 12, 2024
Good content
Anonymous
upvote

Ghazel commented on December 10, 2023
I would prefer get some discussion between members behind every question
FRANCE
upvote

M Somasekhar commented on December 09, 2023
good material
Anonymous
upvote

a concerned tester commented on October 13, 2023
Question 8 is wrong. weight value of zero is alwayse sent
UNITED STATES
upvote

Stag9 commented on July 20, 2023
Surely, have been helpful! an add on layer of confidence before exam.
UNITED STATES
upvote

Spivery commented on March 14, 2023
I did not have much time to study, but this exam dump made it possible for me to pass. I will buy again.
GERMANY
upvote

GIOVANNY commented on March 14, 2023
I memorized the questions from this exam dumps,and it helped me easily pass my exam with flying color.
UNITED STATES
upvote

Elio commented on September 15, 2021
I wrote and passed my exam! I got an 84% and thank you for your exam dumps questions. Could not have done it without this braindumps.
UNITED KINGDOM
upvote