Mastering ServiceNow Scripting
eBook - ePub

Mastering ServiceNow Scripting

Andrew Kindred

Compartir libro
  1. English
  2. ePUB (apto para móviles)
  3. Disponible en iOS y Android
eBook - ePub

Mastering ServiceNow Scripting

Andrew Kindred

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

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.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Mastering ServiceNow Scripting un PDF/ePUB en línea?
Sí, puedes acceder a Mastering ServiceNow Scripting de Andrew Kindred en formato PDF o ePUB, así como a otros libros populares de Computer Science y Computer Science General. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2018
ISBN
9781788624206
Edición
1

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...

Índice