Mastering ServiceNow Scripting
eBook - ePub

Mastering ServiceNow Scripting

Andrew Kindred

Buch teilen
  1. English
  2. ePUB (handyfreundlich)
  3. Über iOS und Android verfügbar
eBook - ePub

Mastering ServiceNow Scripting

Andrew Kindred

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

Understand the ServiceNow scripting and build an efficient customized ServiceNow instanceAbout This Book• Customize your ServiceNow instance according to your organization's needs• Learn to work with inbuilt JavaScript APIs in ServiceNow• Take your ServiceNow experience to the next level by learning to scriptWho This Book Is ForThis book is targeted toward ServiceNow administrators or anyone willing to learn inbuilt JavaScript APIs used to script and customize ServiceNow instances. Prior experience with ServiceNow is required.What You Will Learn• Customize your ServiceNow instance according to your organization's needs• Explore the ServiceNow-exposed JavaScript APIs and libraries• Discover the method for using ServiceNow scripting functions• Take your ServiceNow experience to the next level by understanding advanced scripting• Learn to build, test, and debug custom applications• Use your customized instance efficiently with the help of best practicesIn DetailIndustry giants like RedHat and NetApp have adopted ServiceNow for their operational needs, and it is evolving as the number one platform choice for IT Service management. ServiceNow provides their clients with an add-on when it comes to baseline instances, where scripting can be used to customize and improve the performance of instances. It also provides inbuilt JavaScript API for scripting and improving your JavaScript instance.This book will initially cover the basics of ServiceNow scripting and the appropriate time to script in a ServiceNow environment. Then, we dig deeper into client-side and server-side scripting using JavaScipt API. We will also cover advance concepts like on-demand functions, script actions, and best practices. Mastering ServiceNow Scripting acts as an end-to-end guide for writing, testing, and debugging scripts of ServiceNow. We cover update sets for moving customizations between ServiceNow instances, jelly scripts for making custom pages, and best practices for all types of script in ServiceNow.By the end of this book, you will have hands-on experience in scripting ServiceNow using inbuilt JavaScript API.Style and approachThe book will take a practical approach delving into different aspects of ServiceNow scripting to help you become a scripting master.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Mastering ServiceNow Scripting als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Mastering ServiceNow Scripting von Andrew Kindred im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Computer Science & Computer Science General. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Jahr
2018
ISBN
9781788624206

Building a Custom Application Using ServiceNow Scripting

In this final chapter, we will be looking at building a custom application using ServiceNow scripting. Custom applications are a great way to create functionality not included with the ServiceNow product. We will be looking at creating a custom application and using scripting as part of our application. We will also learn about end-to-end creation of a custom application before exploring how to test and deploy our new custom application.
In this chapter, we will be looking at the following topics:
  • Creating a custom application with ServiceNow scripting
  • End-to-end development
  • Testing
  • Deployment

Creating a custom application with ServiceNow scripting

The ability to build a custom application in ServiceNow makes ServiceNow such a versatile product. As ServiceNow was first released to the market as a service desk solution, developers have explored the potential of the platform, and since then it has been used in various areas of the business.
However, there are still many ways of using ServiceNow that are not included with the baseline system, and for this, we can create a custom application.
Before creating a custom application, it is worth considering whether a custom application will provide the best solution. Sometimes, we can use an existing ServiceNow application to perform the functionality we want to achieve, using it directly or slightly modifying it for our needs. If this is the case, then it is worth considering not creating a custom application and using the platform instead.
If the functionality you need would take a large modification to an existing application or simply does not exist at that point, it is advisable to create a custom application.

Creating the application

Once we create a new application, we can then start adding application files to that application. The application files we create become part of the application.
To create a new application, we can navigate to System Applications | Applications, and we will be shown the current applications that have been created on this instance. We then need to click on the New button on the far right, as shown in Figure 12.1:
Figure 12.1: Instance applications page
Once the New button has been selected, you are given a series of choices about where you would like to start from when creating your application.
We can see the options given in Figure 12.2:
Figure 12.2: Application creation options
From this set of choices, we can decide from what starting point we want to create our application. The top two choices are the most commonly used generally. Starting from scratch is exactly that, only the application is created and the new application scope. No tables or modules or access controls are made for you.
Creating a custom application guides you through creating a table, modules, and access controls. After that, it is much the same as starting from scratch.
The third option, to start from a service, is rarely used in my experience, but allows a developer to enhance a service created from the service creator and potentially overwrite it when complete.
The final option here is not available as part of the baseline system, but can be used if service management is activated. This option again is not as well used, although it allows creation from an existing process.
When selecting start from a template, we are presented with a further page, which we can see in Figure 12.3:
Figure 12.3: Application creation template option choices
From here, we can either create from a predefined template, or configure settings further to create the application.
Now the custom application has been created, we can start to add application files and build up the application.

Building the application

Once the application has been created, we can start to build up the application with application files. These are the files that, when put together, make up the application. When the application is created, an application scope is also created for the application. On the creation of the application, you will also be put into the new application scope, so it is important to be aware of this.
You will also see that your update set has changed once you create a new update set to a new default update set for the application scope you are now in. As you are in the application scope of your new application, any customizations made will be added to your new application.
To keep track of the current scope and update set, it can be useful to show the application and update set picker when developing. These two options can be set in the Developer tab of the system settings, which can be seen in the following figure:
Figure 12.4: Developer system settings showing the application and update set picker
By setting the two picker options in Figure 12.4, we are then shown the current application scope and update set at the top of the screen in the header bar. These are shown in a drop-down field, so both can easily be changed if required.
We can see here both of the picker drop-down fields that are displayed in the header bar:
Figure 12.5: Application and update set picker
These picker fields are especially helpful if you are working between update sets or in multiple scopes for your current development.
When working in multiple tabs, it can be a wise idea to refresh your browser page to ensure that the pickers are up-to-date on the tab you are working on.
Now that we have created and started to build our application, we can move on to the development of our application.

Example application

In this chapter, we will also build an example custom application to reinforce the theory that we learn. For our example, we will build an application to hold data for users' access.
First, we need to create the application. From the options we saw in Figure 12.2, we are going to select Create custom application. Once we have selected this, we are given the form shown in Figure 12.6:
Figure 12.6: Create custom application form
In this form, we need to give our application a name, which will then fill in the rest of the fields. We can change the values in the fields, but in the Scope field, the prefix will have to be the prefix for your company or developer instance.
For our example, we also want to create a table, so we...

Inhaltsverzeichnis