Skip navigation

Developer Community

9 Posts authored by: John Andersen

Screenshot_11_20_14__6_44_AM.png

This is the first in a series of posts on the basics of AngularJS as it pertains to the ServiceNow platform.  I hope this handful of tutorials or similar blog posts will show the building blocks of leveraging AngularJS in ServiceNow as well as identify any gotchas or workarounds that you may need to do to fit into the ServiceNow paradigm.

This first tutorial covers just a basic Model element on a form. 

 

The Use Case

The goal is to take the following Basic HTML form and leverage Angular to create a dynamic experience.  Essentially our form will have a simple edit box.  When you type something in the edit box, we want it to show up in the text below it.

 

To get step by step instructions on building out this use case in ServiceNow with AngularJS, please see my full blog entry:  Angular in ServiceNow: Tutorial #1 - Model Basics

John Andersen
Passionate fan of Custom Apps, Integrations, and Service Portal Experiences
http://www.yansa.io

Screenshot_11_19_14__8_09_AM.png

 

I have been meaning to write about the amazing ServiceNow plug-in for the SublimeText 2 editor. The plugin was developed by Paul Senatillaka and possibly others at Fruition Partners. It allows you to put a special comment header at the top of any file in the SublimeText editor. These comments give enough information for the editor to post the code up to the corresponding record in ServiceNow any time you save the document in Sublime.

 

For those of you unaware of this powerful plugin, please watch my demo video and find download links on my blog post:  Edit ServiceNow Code in SublimeText Editor

John Andersen
Passionate fan of Custom Apps, Integrations, and Service Portal Experiences
http://www.yansa.io

angularjs.png

Loading the AngularJS or other complicated javascript libraries on a ServiceNow instance may appear to be impossible at first, but with the following handy trick, you have can enhanced capabilities within just a few short minutes.

 

While there are cool little tools created by some of my colleges that do this for you on some specific libraries, I would like to show you first hand how to do this manually so that you are empowered to load the libraries that you need for your own development inside of ServiceNow.

 

There are four steps to this process:

  1. Download the javascript library
  2. Create a blank UI Script
  3. Add the script via a List View
  4. Call the script from your page

 

For the full tutorial and accompanying video, please see my post:  Adding AngularJS and other Javascript Libraries to ServiceNow.

John Andersen
Passionate fan of Custom Apps, Integrations, and Service Portal Experiences
http://www.yansa.io

A Styled Page in ServiceNowNo, I am not a UI Master, nor am I a genius at style. I do my best to at least make interfaces functional, and that is about it. So, for me providing styling guidance is a bit of a joke, but here is something that I learned that has helped my various UI Pages and UI Macros become a bit more flexible – both when in use within the same instance, or when being packaged up and distributed to other instances.

 

The following blog post explains how to leverage the CSS Page records in ServiceNow in separate UI Pages and Macros.  Also, I cover how to do all of this in a manner that does not rely on Sys_id's that could change from instance to instance.

 

Read more here:  Styling UI Pages and UI Macros in ServiceNow

John Andersen
Passionate fan of Custom Apps, Integrations, and Service Portal Experiences
http://www.yansa.io

ServiceNow_Service_Automation3.png

ServiceNow's built-in CTI Integration allows third party phone agents to do a screen-pop to send call data to the ServiceNow instance to pre-populate a ticket or do other activities. By default, the CTI integration will take the call information and determine if the caller already has open tickets associated to them. If they do, the system will show that user’s record with a list of their open incidents and assigned configuration items.

While this feature is great, a lot of companies want to bypass this feature and open a new incident form regardless of whether or not the caller already has open tickets.

The following solution creates a new CTI Rule in a ServiceNow instance to give your Call Agent System the opportunity to force open a new incident record regardless of the number of open tickets already associated to the user:

John Andersen
Passionate fan of Custom Apps, Integrations, and Service Portal Experiences
http://www.yansa.io


The ServiceNow Dublin release includes a new enhancement around security protecting the WSDL resources on a ServiceNow instance. In the past, you had two options with regard to controlling who could view your WSDL documents. One, you could require a user to authenticate before they could see the WSDL. Two, you could allow anyone to see the WSDL document. All this was controlled by a simple checkbox in the web services security properties page.


To read more about this change and how to work with it, please see: 

http://www.john-james-andersen.com/blog/service-now/unauthenticated-access-to-servicenow-wsdls.html

John Andersen
Passionate fan of Custom Apps, Integrations, and Service Portal Experiences
http://www.yansa.io

I was recently asked to provide a newsletter for several internal teams within our company. The first few months were a pain as I had to use an HTML editor to generate a decent looking newsletter each time I wanted to get the word out on some articles that I have been creating. Finally, I asked myself why I was going through all this pain when ServiceNow would be the perfect platform to build a newsletter application that automates most of the tasks.


201402-February_html.png

Within a couple of days I had a pretty decent application that would allow me to create newsletters with templates, dynamic variables, scripting capability, and article management. Since then, the writing of my newsletters have become much easier to do. Organizing my articles and sending them out to distribution lists are so much better than my copy and paste solution with my previous method.

I’ve decided to share this application with others who would like to take it and implement it within their own instance. It is not perfect, and there are several and him that I would like to perform in the future. However, if you’re not afraid to play with it, I think you will find it to be a great help to you in creating your own newsletters.

For full documentation on the app as well as a demo video and downloadable update set, please visit:  Create and Send Newsletters using ServiceNow

John Andersen
Passionate fan of Custom Apps, Integrations, and Service Portal Experiences
http://www.yansa.io

ScriptedRESTMessage.png

ServiceNow has always been great to make traditionally difficult integration interfaces easy to setup and execute. This typically translates into a lot of point and click activities.

For the die-hard coders, like me, sometimes we want a little less point and clickedness to get our job done.

To learn about (and download) this new library, please visit my blog:  Scripted REST Calls in ServiceNow

John Andersen
Passionate fan of Custom Apps, Integrations, and Service Portal Experiences
http://www.yansa.io

Show_External_Websites_in_a_Dialog_From_ServiceNow_Lists-_John_James_Andersen-2.png

There are several good examples on blogs and the ServiceNow wiki of creating a popup-style dialog box to show form or list data from another ServiceNow form. I wanted to use those examples to create yet another scenario: From a ServiceNow list, right-click on a record and have an external website pop up as a dialog box and accept information from the list record that was selected.

In this example, users can browse incidents in their ServiceNow instance. In the list view, they can right-click an incident and choose an option to view related search results in Mozilla’s Open Directory Project (DMOZ.org). The action will take the terms from the “Short Description” field on the selected incident and show search results on those terms from DMOZ.

To read more about how to set this up in your own instance read more at Pass form data to a Popup Dialog Window.

John Andersen
Passionate fan of Custom Apps, Integrations, and Service Portal Experiences
http://www.yansa.io

Filter Blog

By date: By tag: