Using an icon library in ServiceNow Content Management System

General No Comments »
by:

(AKA: Help, we need more icons!)

Every now and then, you might need extra icons in the Content Management Section of Service Now.

In this sample, I show you how to use Font Awesome (http://fortawesome.github.io/Font-Awesome/), a library containing 0ver 400 icons (and growing). The advantage of a library like this is that it is actually a font, which is available after loading, saving a lot of bandwidth compared to icons in image files.
Continue reading…»

Update the GlideRecord object with Journal fields

General 1 Comment »
by:

A short while ago, while implementing Service-Now for a customer, we experienced behaviour we did not anticipated.
We were creating a mechanism where we could send and receive messages through SOAP Web Services.
While processing the received data, we had to update the work_notes field in the Incident table. In our implementation, work_notes is a ‘journal’ field. We had to loop through some data rows and it was our intention to use one update to write all found data to the record.
We updated the work_notes field directly in the GlideRecord object (as you would normally do) in a loop, using a statement like:

gr.work_note += varString;

The insert statement caused the work_notes field to show as much separate updates in the Activity log as we had loops in the program.

Since this behaviour was unwanted, we solved it by using a variable in the loop instead of the “gr” object.
So, whenever you have multiple updates to a journal field, be aware of this behaviour!

I hope this blog article is helpful. If you have questions, please let me know via email or a response below!

Good luck!
Kind regards,
Fred van der Schaar (.img[at].img)

Worknote added indicator

General 2 Comments »
by:

In our support Portal, we make use of the worknotes in incident tickets. Worknotes make it possible for us to discuss an incident (inside the incident) without bothering the customer with an overload of updates. Or, without the customer knowing we are discussing….

What we needed was a method to quickly detect an update in the worknote of an incident. The easiest way to detect the update would be if it were visible in the incident list.

How did we do that?
We created a new field in the incident table, a Boolean (only two values, true or false). The field was named “u_new_worknote” , default value is False.

A simple business rule was added to the incident table. This business rule always runs, at least on update of the incident table. If the worknote fields is changed, we set the field to true. In any other case, the field is set to false.

[cc lang=”javascript”]
if (current.work_notes.changes()) {
current.u_new_worknotes = true;
} else {
current.u_new_worknotes = false;
}
[/cc]
We added a new style to the incident number, so we could notice the new worknote… This style makes use of the content of the field u_new_worknotes to decide to change the color on the list… The list is only changed if the user has a role. So, customers, who have no role at all, do not see this

Name: incident
Field: number
Value: javascript:current.u_new_worknotes == true && gs.getUser().hasRoles()

Style:
background-color: #FFFFB0;
background-image: url(‘images/icons/alert.gif’);
background-repeat: no-repeat;
background-position: 98% 5px;
padding-right: 20px;

In the image below, you see the results in the incident list:

You see, with a simple adjustment you can make ServiceNow do exactly what you want!

If you need to reach me you can send me an email on .img[at].img

Registration of Business Requirements using the Business Requirements application

General No Comments »
by:

The Business Requirements application is an addition to Service-Now’s SaaS and was created by 2e2 Consulting. The main purpose is to register changes made to the default Out-Of-The-Box functionality as delivered by Service-Now.com. Not only Business Requirements are registered, also the Functional Specifications and the Technical Specifications are captured.

Besides registration it also offers a testing plan and deliver tool.
If using the Business Requirements application as it is supposed, all changes to Service-Now.com are specified, tested and approved.

The end result is an extensive overview of all changes made, including the reason for that change.
This is a great guide for supporting the customer and gives a good insight in changes made for future consultancy assignments.
Continue reading…»

Altering the DOM (Document Object Model) with Javascript

General No Comments »
by:

About me

I’m working in the support area of Service-Now.com. I have a history in Service Management that dates back to the early 90’s of the previous century. I worked on both ends of the line, as customer and as vendor of Service Management solutions.
Back in 2000, we only could dream of the Service-Now solution!

About my Blog post

Service-Now pages are displayed in a browser. All you need to connect to the system is a compliant browser (like IE/Firefox/Chrome or Safari). If you know the output is generated as standard (X)HTML and is accessible through DOM, you also can figure how to adjust (some of) the display characteristics. All you need to do is insert some JavaScript (accessing the DOM) inside the generated web pages, and voila: your output is altered the way you want it!

Remark: the changes discussed here, will be executed only inside your browser. No scripts will be executed on the Service-Now server!

But first I will give you some background on the Document Object Model….

What is DOM?

“The Document Object Model (DOM) is a cross-platform and language-independent convention for representing and interacting with objects in HTML, XHTML and XML documents. Aspects of the DOM (such as its “Elements”) may be addressed and manipulated within the syntax of the programming language in use. The public interface of a DOM is specified in its application programming interface (API).”
(source: Wikipedia)

Ah, so it is cross-platform. That means, it should be available in different brands of browsers on different brands Operating Systems….
Hmm, it also claims to be the way to access elements inside HTML, and even manipulate them!
And it uses the “programming language in use”, which is JavaScript for the browsers we know; we use JavaScript all the time in Servive-Now’s Client Scripts and Business Rules.
That gives us nice possibilities to alter information displayed on screens!

Knowing this, we can start working with the DOM…..
Continue reading…»