• Home
  • ServiceNow
  • CAD ServiceNow Certified Application Developer Dumps

Pass Your ServiceNow CAD Exam Easy!

100% Real ServiceNow CAD Exam Questions & Answers, Accurate & Verified By IT Experts

Instant Download, Free Fast Updates, 99.6% Pass Rate

CAD Premium Bundle

$74.99

ServiceNow CAD Premium Bundle

CAD Premium File: 131 Questions & Answers

Last Update: Jan 28, 2023

CAD Training Course: 54 Video Lectures

CAD Bundle gives you unlimited access to "CAD" files. However, this does not replace the need for a .vce exam simulator. To download VCE exam simulator click here
ServiceNow CAD Premium Bundle
ServiceNow CAD Premium Bundle

CAD Premium File: 131 Questions & Answers

Last Update: Jan 28, 2023

CAD Training Course: 54 Video Lectures

$74.99

CAD Bundle gives you unlimited access to "CAD" files. However, this does not replace the need for a .vce exam simulator. To download your .vce exam simulator click here

ServiceNow CAD Exam Screenshots

ServiceNow CAD Practice Test Questions in VCE Format

File Votes Size Date
File
ServiceNow.actualtests.CAD.v2022-12-14.by.jordan.46q.vce
Votes
1
Size
89.52 KB
Date
Dec 14, 2022
File
ServiceNow.practicetest.CAD.v2021-07-02.by.energizer.34q.vce
Votes
1
Size
75.24 KB
Date
Jul 02, 2021
File
ServiceNow.testking.CAD.v2021-04-26.by.jayden.28q.vce
Votes
1
Size
67.93 KB
Date
Apr 28, 2021
File
ServiceNow.practiceexam.CAD.v2020-04-08.by.tommy.25q.vce
Votes
2
Size
39.33 KB
Date
Apr 08, 2020

ServiceNow CAD Practice Test Questions, Exam Dumps

ServiceNow CAD ServiceNow Certified Application Developer exam dumps vce, practice test questions, study guide & video training course to study and pass quickly and easily. ServiceNow CAD ServiceNow Certified Application Developer exam dumps & practice test questions and answers. You need avanset vce exam simulator in order to study the ServiceNow CAD certification exam dumps & ServiceNow CAD practice test questions in vce format.

Scripting Locations & API Introduction

1. Business Rules

Hello and welcome to Section Three Scripting Locations. As the name implies, in this section, we'll take a look at the most popular and commonly used scripting locations within ServiceNow. So we'll start this section with an introduction, and then we'll discuss the many scripting locations within ServiceNow. Then we'll start to break down each major location. So we'll cover business rules, clientscripts, UI actions, and UI policies. We'll discuss scripts, which include scheduling jobs and even scripting and workflows. Then we'll go over a diagram, mapping out roughly where to customise within a service. Now, we'll end this section by discussing APIs and what they are, and I'll provide some analogies, and then we'll discuss where we can actually use these within the platform. So let's get started. So it turns out that there are a number of places to script within a service. Now, there are actually over 30 different scripting locations within the platform, and this number continues to grow as the platform grows. So for this course, instead of covering every single location, some of which you'll never use, I decided to break up this section by the most important and commonly used scripting locations. So some of the most commonly used are outlined here. So we have business rules. The script includes client scripts and UI actions, UI policies and schedules, jobs, workflows, transform maps, web services, UI pages and the UImacros service, a portal, widgets, and many more. Now, for the purposes of this section and covering each one of these in more depth, we'll only be covering the locations that are outlined in green. So everything from business rules to workflows But because this course is designed to focus more on the how than the where, the fundamental concepts that we learned throughout this course can be applied to just about any scripting location. All right, so now let's discuss business rules. Business rules are server-side, so they only run on the server side. They will never execute on the client side. And we have our server-side icon in the top right. So anytime you see this, it's safe to assume that that particular component is serverside. So the ServiceNow docs state a business rule is a server-side script that runs when a record is displayed, inserted, updated, or deleted, or when a table is queried. For the rest of this section, we'll discuss what exactly this means. So business rules are probably the most common scripting location within ServiceNow, and business rules are actually JavaScript that runs on the server. So in today's world, when we think of JavaScript on the server side, you're probably thinking of something like NodeJS. However, ServiceNow actually uses Mozilla Rhino, which is a JavaScript runtime written in Java. Since the ServiceNow source code is written in Java, business rules are triggered by database operations. So, as stated in the quote, any time a record is inserted, updated, or deleted, or even queried, a business rule can run out of the box. There are over 2400 business rules, so they're commonly used all throughout the system. Within a business rule, we as the developer have access to the current object, the previous object, and the scratch pad. So what does this mean? Well, for example, say we have a business rule that runs when a new incident is inserted in the incident table. Well, you can think of that specific incident as being the current object. So if we wanted to access the number assigned to this new incident, we could do something like use the current dot number and a script. That's what it means when I say we have access to the current object. All right, so here's a form view of a business rule. This specific business rule creates a new asset record when a new CMDB item is inserted into the table. So some of the most important fields contain the specific table that this business rule is running on, in this case, the Cmdbci table, and the conditions for this business rule. And it turns out that business rules have two conditions. There are the database operations, so you can see we have checkboxes for insert, update, delete, and query. And then we have custom conditions. So using the filter conditions field shown at the bottom, or using the condition script field shown on the right, we can specify when we would like this specific business rule to run. So in the condition to the right, we're saying we only want this to run if the current asset is nil. To put it another way, if the current CIA record does not already have an asset associated with it, or if the current asset CI does not equal the current system ID, the current CIA record is deleted. So you can use the scripting condition or, again, the filter conditions to gain access to all of the fields on this table. So you can get very granular and decide when you want a specific business rule to run. And finally, there's a "Win" field. So we can either specify if we want this business rule to run before the record is inserted, after the record is inserted, or a few other options as well. All right, now let's take a look at an example. So, for the purposes of this example, we'll say a user sends a request to the server for a specific incident. So this would be a query. The application server requests the records from the database server. The database server responds to the application server with the record. The application server checks for display business rules and then sends the response back to the user. So we have our display event that would trigger any display business rules. Then the user modifies the incident record and sends an update request. The application server receives the update, checks for prior business rules, then sends the data to the database server to be updated, the database server updates the record, and the application server checks for any subsequent business rules. So, using this example of a user updating an incident record, we can see all of the points at which a business rule can run and be triggered. All right, so now let's cover the use cases for a business rule. So, for use case number one, as we just saw, we could create an associated CI when a new asset record is created. And business case number two is that when an incident is reopened, you increment the reopen count. If you'd like to take a look at more examples, I highly recommend going to the Business Rules table and just examining some of the 2400 "out of the box" business rules. But it's important that you do not update the "out of the box" business rules. All right, now let's take a look at a demo of business rules within ServiceNow. So to start with, I'll go to the Incident table by typing in Incident List in the Application Navigator. and this will take us directly to the incidents table. Now I'll click the hamburger menu on the top left and click Configure Business Rules. So here is a list of all incidental business rules. We can see in the top right that there are 29 of them. Some are active, and some are deactivated. For the purposes of this video, we'll go into the incident, create knowledge, and business rule. So on the Winter Run tab, we can see that this runs after a new incident is inserted, and it's running on Insert and Update with an order of 100. We can also see that the Advanced checkbox is selected in the top right. So we do have the advanced tab here. Under the Actions tab, we could set specific values if we wanted to without touching any script at all. But the Advanced tab is more commonly used, where we have complete control within the scripting environment. So here we can see we have a condition for when to run this script and then the actual script, which is creating the new knowledge article. Alright, let's take a look at another one. We'll go into the Reopen Count business rule and select when to run. And we can see that this runs before the record is updated. And all this is doing is incrementing the reopencount by one every time that this event occurs. So if you type in "Business Rules" in the Application Navigator under System Definition, there's "Business Rules," and this shows all of the business rules in the system. In the top right, we can see that we have 2483 business rules.

2. Client Scripts

Hello and welcome back. In this section, we'll cover client scripts within ServiceNow. The ServiceNow documentation states client scripts run on the client's web browser. You can use client scripts to define custom behaviours that run when events occur, such as when a form is loaded or submitted or a cell changes value. As previously stated, client scripts are JavaScript programmes that run on the client side. The majority of the time, you use client scripts on the form view. So when you're within an actual record on the form view, you might use client scripts for when a specific value changes. You'd like to manipulate another field. Client scripts are triggered by field changes, page loads, form submissions, and sell edits. So if you're within the list view, you can fire client scripts when specific cells change as well. Client scripts are shipped to the browser. So you'll write your client script within ServiceNow, and then when a specific form loads that has that client script, it'll get shipped to the browser. And if it's triggered by when a field changes, it will sit in your browser's memory until that event occurs, and then it'll run. This is an important distinction because an additional request in response to the server does not need to happen. The client script is shipped to the browser when the initial page is loaded. So the script logic runs almost in real time, unless, of course, it contains additional calls to the server. All right, now let's take a look at the form view. So, some of the most important fields are in the table, which specifies when we would like this to run. So this runs on incidents of the UI type, which specifies if we would like this to run on desktop or mobile or even both, which is generally best practice, especially because the UI type must be both or mobile in order for this to run within the service portal. Then we have a type field, which is where we specify if we want this to run on change. So when a field changes on load, on submission, et cetera, we have the field name field that shows up only when the type is on change. So you can read this as "when the field name caller changes." We would like to run the script. And finally, the script field down below is where we'll place the actual JavaScript that runs within the browser. It's important to note that we do, in fact, have access to jQuery in this script since this is running on the browser. But it's not always recommended to manipulate the Dom directly with Jquery. It's best practise to instead use ServiceNow's APIs when available. Later on in the course, we'll discuss those APIs. Right now, let's take a look at a few use cases. So, the first use case is that we would like to highlight the colour field if the user is a VIP. So a lot of times we place a special icon next to the colour field, or we might want to highlight it in yellow or some other colour only if that colour is in fact a VIP. A second use case is to run the conflict checker for change management. So when we're inserting a new change, there are certain triggers that will run the conflict checker automatically and check for Blackout, Windows, and other changes that are happening on that specific CI. Right now, let's take a look at client scripts within ServiceNow. So, to start with, we'll go back to the incident table. So we'll do Incident List, and we'll click the hamburger menu and click Configure. This time we'll click client scripts. So here are all the clientscripts associated with the Incident Table. So, for the purposes of this video, we'll actually go into the highlights of the VIP caller client script. So if I select the UI type again, we can see Desktop, Mobile, slash, Service Portal, or all. The main difference between using desktop or mobile, a service portal, or even all of them is that within a desktop UI type, we can use some of the older, now deprecated glideform methods, which we'll get to in section six. But for new instances and going forward, it's best practise to only use the currently supported APIs. So I would highly recommend that you make all client scripts a UI type going forward. Now, for the type field, we have on SellEdit, on Change, on Load, and on Submit. So if we have a change selected, we have the field name, and this allows us to select any field on the Incident Table. So if that field changes, it'll trigger the execution of the script. And finally, we have the script here, so all it's doing is some logic and some CSS. So we have an image that is displayed next to the caller field if they are, in fact, a VIP. Now let's take a look at another client script. So, we'll go into onload Hello, which is a client script I use in the Glide Ajax section. But this specific client script runs on form load. For the purposes of this section, keep in mind that it's not important to focus on the scripting right now. We'll get into exactly what we're doing later on in the sections when we're discussing the APIs. For the purposes of this section, I just want to cover the different locations you can apply scripts to. So we'll definitely come back to the actual scripts that you're seeing here, and we'll discuss what's going on behind the scenes. And finally, if we type in client scripts within the application Navigator under system definition, we can click on client scripts, and this will take us to all the client scripts in the system.

3. UI Actions

Hello and welcome back. In this section, we'll be discussing UI actions. So the service now documents UI actions—adding buttons, links, and context menu items to forms and lists, making the UI more interactive, customizable, and specific to user activities. UI Actions can contain scripts that define custom functionality. So from this description, we can see that there's a lot going on with UI Actions. UI actions can run server-side or client-side, or even both. UI Actions can be buttons, menu items, or links, as shown in the images here below. UI Actions are typically configured for form views, so you'll generally only see UI Actions within a form view of a record. All right, so let's check out the form view of a UI action. So some important fields are in the table. So in this case, we have this UIaction running on the problem table, and we have Show on the Insert or Update buttons. When this option is selected, this UIaction will only appear on updates. So, if we insert a new record for the first time, creating a new problem, this UI action will not appear. Then we have the client checkbox. So if we select this, we'll instruct the service now to run some JavaScript on the client side as well. Then we have what type of UI action this will be. So on the right we have formview, button, contacts, menu, form link list, banner button list, bottom button, etc. We also have a condition field, so we can specify specifically when this UI action will show. So in this case, we only want this to show if the current user has the ITIL role and the current problem record's RFC field is nil or does not contain a value. And finally, at the very bottom we have the script field, where we apply any server-side or client-side logic we would like to execute. All right, so now let's take a look at serverside UI actions. On the server side, we have access to the current object. So again, if this was on a problem record, we would have access to that current problem record's fields. We also have access to the GlideRecord API and the Glide System API. and really, any server-side API. Again, we'll go over these APIs in greater detail later in the course. Server-side UI actions are generally the default behavior. So in order to have a specific UI action be client-side, you'll actually need to select the client-side checkbox. It depends on what you're doing within the specific UI action, but generally they offer better performance since they are on the server as opposed to being on the client side. All right, so let's take a look at client-side UI actions. So if we would like a specific UI action to be client-side again, we would make sure that the clientside checkbox is selected by selecting the client checkbox. We'll then see an onclick field, and in the onclick field we specify the name of the method we'd like to invoke when the user either clicks this button or link, et cetera. So in this specific example, when the user clicks this UI action, the resolveIncident function will be called. We can use the action dot set redirect URL to redirect the user to another page within the service. We can now call other UI actions on the current form by using one of the following: GsftSubmit and then gel, followed by the UI action name specified in the Action Name field, or Gsft Submit and then null gformgitformelement, followed by the UI action name. And finally, if we would like to run server-side and client-side JavaScript, we could do so by selecting the Client checkbox, specifying an onclickmethod, and then creating the Onclick function. So the order of operation in this scenario would be: first, when the user clicks the UI action, the client-side code will run. Then for our server-side code, we would actually place that within an if statement. So, if the type of window equals undefined, we'll either call a server-side function or directly place the code in that if statement. And all this if statement is saying is if a window currently exists, which is your browser window. So for this example, if the window does not exist, then it's safe to assume that this is on the server side, and we can place our server-side logic here. All right, now let's take a look at two use cases for UI actions. So in the first use case, we'd like to trigger a Salesforce integration, which creates an associated Salesforce ticket. In the second use case, we would like to reject an approval record. So when the user clicks reject, that will actually mark that current approval record as rejected. Alright, now let's take a look at UI actions within ServiceNow. So to start with, we'll head back to the Incident table, we'll click the hamburger menu, and we'll click Configure UI Actions. To start, we'll go into the close-incident UI action. We can see that this only appears on Update and that it is a form button. Then under the Condition tab, we only want this to appear if this current condition evaluates to true. Finally, we have a script below which sets the incident state to closed and updates the incident. Now let's take a look at the Create Change UI action. So, the check box on the right indicates that this is a form context menu, and it also runs only on Update. Right now, let's find a clientside UI action. So we'll go into the Reopen Incident UI action, and we can see that the client checkbox is selected, and that on click we will invoke the Reopen Incident function, which is defined here in the script below. So everything within this function is client-side code. Then, on line 18, we say that if the type of window is undefined, we want to call the server's reopen function. And then all of the code within the server reopen function is server-side code. So we have access to the current object.

4. UI Policies

Hello and welcome back. In this video, we'll take a look at UI policies. So, the ServiceNow docs state that UI policies offer an alternative to client scripts for dynamically changing information on a form. Use UI policies to define custom process flows for tasks. So, UI policies are client-side logic and probably about 99% of the time require no scripting at all. UI policies are typically used on forms to do things like set a field to read-only or mandatory, or even show or hide that field based on certain criteria. UI policies are a way to set an action on a field based on certain conditions without scripting that logic. So how is this done? Well, let's take a look at the form view. So first we have the table. So in this example, you can see that we have the Asset table here, and then you specify a condition. So there are a set of conditions under which this UI policy runs. It runs if the substate is pre-allocated, if the class is not consumable, and if the class is not a software license, then at the bottom of the form we have UI Policy Actions. And this is where we select what fields we want to set to mandatory, visible, or Read Only.So in this screenshot, we have the install status being set to read only, the assigned field set to hidden, and the location field set to read only. Finally, there is the ability to run scripts. If the Run scripts checkbox is selected, then we get script fields to execute if our conditions evaluate to true as well as if they evaluate to false. Now, let's take a look at two use cases for UI policies. The first use case sets an Incident Short Description field to be read only if the incident state is closed. In the second use case, we'd like to hide an "Incidents Resolution Notes" field if the state is open. Now let's take a look at UI policies within ServiceNow. All right, so we'll navigate to the Incidenttable, we'll click the hamburger menu and click Configure UI Policies, and we'll go into the make fields read Only on Close UI Policy. So here we can see that the condition is if the incident state is closed, then we would like to do the following under the UI Actions, and essentially we have a number of incident fields that we're setting to read-only if we go into one of these UI Policy actions. Here we have the ability to select the field name, in this case "opened," and then we have the ability to set whether we want this to be mandatory, visible, or read only.Now, let's go into the show. Close the code and notes. if closed or resolved. So here we can see that this runs if the incident state is resolved, if the incident state is closed, if the state is resolved, or if the state is closed. And how does this work exactly? Well, the UI policy actions have two records—the close code and the closed notes. And we're setting those to be mandatory as well as visible. All right, now let's look for a UI policy that has scripts. So we'll run scripts as true and search. And now, if use basic off is true, we'll go into basic off user and password, and so on when to apply. We can see that this will run if "Use basic authentication" is set to true. So under the script tab, we see that we're running one line of JavaScript on line two. Keep in mind, these scripts are client side.So let's go into one more. We'll go into the pre-allocated constraints, and we can see that in the executive true field we have four or five lines of JavaScript here.

5. Script Includes

Hello and welcome back. In this video, we'll take a look at script includes in ServiceNow. So the ServiceNow doc state script includes are used to store JavaScript that runs on the server. Great. Script includes to store JavaScript functions andclasses for use by server scripts. Each script included defines either an object class or a function. Script includes run only whencalled by a server script. So script includes are in fact server-side JavaScript, and they're used to store JavaScript classes and functions or methods you can think of. Script includes reusable snippets of code that you might reference or invoke from another place in the system. It's important to know that a script include only runs when it's invoked from another place. So just because you create a script includein the script includes table, unless you callthat script include from somewhere else in thesystem, then that script include will never run. Script includes are unique since they can be called from anywhere; they can be called from the server side and they can also be called from the client side, as we'll see here in just a second. So let's take a look at the form view of a script include. First we have the name, which is important because we use this name to refer to this script in other places. So it's always important that we give it a unique and meaningful name. Then there's a client callable checkbox, and if this is checked, the system will autogenerate some JavaScript for us in the script field and make it extend an Ajax class. We'll get to this more in Section Seven. So don't worry about the details for now. Just know that if the client callable checkbox is checked, then we can invoke the script from the client side. And finally, at the bottom, we have our actual JavaScript and the script field. Now let's talk about some script characteristics. So there are two types of script includes. There are class list script includes where there is no JavaScript class being created. These script includes must have the name ofthe script include equal to the function name. So you see here on the right in the image, the name "git formula action" of the script include must be the exact same as the name of the function in the script field "get formula action." These classless script includes are only available on the server and cannot be accessed from the client. Now, on the other hand, in a class script include, these can be invoked from the client side or server side, and they typically extend another class, as shown here in this image. how this agent-schedule Ajax is extending the abstract Ajax processor. Again, we'll talk a lot more about the specifics and what's going on in the script fields in Section Seven. But for now, just know that there are class lists and class script includes. Some important attributes to a script include are the script include name, which, as stated, is used to invoke the script include from somewhere else in the system, the type property, which will automatically be generated for us when we provide a name in the script include name field, and the prototype property, which we can use to extend a class and JavaScript. All right, now let's take a look at extending script includes. So any class may be extended by a script include, which can extend another script include. This makes them very modular. The abstract Ajax processor is a common script include that is extendedfrom. So the abstract Ajax processor is included and provides us with helper functions that allow us to call the extended script include from the client side. The syntax we use to extend another class is class name prototype equals object extends object, where we pass in the extended class name as the first argument and then our script as the second argument. We generally don't have to type this out. If we're extending the abstract Ajax processor by checking the client callable checkbox, the system will automatically generate this code for us. All right, now let's quickly take a look at two use cases. So in the first use case, we're simply creating commonly used helper functions and storing those in a script include. So maybe we perform a calculation so often that we abstract that calculation into its own script include. So then we can just call this script, passing in a few arguments, and we don't have to keep writing out these calculations every time we reference them. In the second use case, we call a custom function via Glide Ajax. And as stated before, Glyde Ajax is a ServiceNow API that we'll discuss in Section Seven. Alright, so now let's take a look at the scripts included in the service. Now. So if we type in script includes here, we can click on the script includes module under the system definition. And here is a list of all of the script includes. In this instance, you can see that we have roughly 1300 scripted includes. It's important to note that we didn't access this page by first going to something like the incident table, clicking the hamburger menu, and clicking Configure script includes. That's because the script includes aren't tied to a specific table or application. You can think of this as being more modular, so you can reference these script includes from anywhere in the application. All right, so let's jump into a script include. We'll go into this OutoftheBox sample and update one script that stores a lot of the code. When the sample to plug in is enabled, We can see that the Client callable checkbox is not selected and that there are many methods created in the script field. Now let's go back and check out what the state flow script includes. We see a number of methods in this one as well. Now let's go into a client-callable script include. So we'll filter "clientcallable equals true." And we'll select the CSP utilities. These are helper functions for the consumer portal. So in this one, we can see that the client cupboard checkbox is selected. That online. Second, we see the script's name: "includes csputails prototype, equals object, extends object abstract Ajax processor." So this is extending the abstract Ajax processor script's include. And this has a number of methods as well.

Go to testing centre with ease on our mind when you use ServiceNow CAD vce exam dumps, practice test questions and answers. ServiceNow CAD ServiceNow Certified Application Developer certification practice test questions and answers, study guide, exam dumps and video training course in vce format to help you study with ease. Prepare with confidence and study using ServiceNow CAD exam dumps & practice test questions and answers vce from ExamCollection.

Read More


Comments
* The most recent comment are at the top
  • Medni
  • Sweden
  • Apr 01, 2020

I will take my exam CAD IN THIS MONTH

  • Apr 01, 2020

Add Comment

Feel Free to Post Your Comments About EamCollection VCE Files which Include ServiceNow CAD Exam Dumps, Practice Test Questions & Answers.

Purchase Individually

CAD Premium File

Premium File
CAD Premium File
131 Q&A
$76.99$69.99

CAD Training Video Course

Training Course
CAD Training Video Course
54 Lectures
$27.49$24.99

Top ServiceNow Certifications

Site Search:

 

VISA, MasterCard, AmericanExpress, UnionPay

SPECIAL OFFER: GET 10% OFF

ExamCollection Premium

ExamCollection Premium Files

Pass your Exam with ExamCollection's PREMIUM files!

  • ExamCollection Certified Safe Files
  • Guaranteed to have ACTUAL Exam Questions
  • Up-to-Date Exam Study Material - Verified by Experts
  • Instant Downloads
Enter Your Email Address to Receive Your 10% Off Discount Code
A Confirmation Link will be sent to this email address to verify your login
We value your privacy. We will not rent or sell your email address

SPECIAL OFFER: GET 10% OFF

Use Discount Code:

MIN10OFF

A confirmation link was sent to your e-mail.
Please check your mailbox for a message from support@examcollection.com and follow the directions.

Next

Download Free Demo of VCE Exam Simulator

Experience Avanset VCE Exam Simulator for yourself.

Simply submit your e-mail address below to get started with our interactive software demo of your free trial.

Free Demo Limits: In the demo version you will be able to access only first 5 questions from exam.