SLA Engine and commitments

General No Comments »
by:

There are many ways and reasons to define a SLA inside ServiceNow, but most of you will be familiar with the concept of standard SLAs: You define a condition for the start, pause and stop of the SLA measurement and it will start counting the time on and off the clock. It becomes interesting when you want to tie these measures of SLAs up to service performance and track potential commitments that you have agreed on. Especially when penalties are involved it becomes critical that you define your SLAs well, and properly keep track of them. My colleague Benjamin van de Water wrote a nice piece a couple of weeks ago giving some tips on proper agreements and making sure your IT organization is aligned between all potential levels of them: Things to Consider when defining SLAs, OLAs and UCs.
Continue reading…»

Out of the box

General 2 Comments »
by:

WB 3
Have you worked in an implementation team that upheld a principle to change as little as possible to the out of the box system? Where it is important to implement what can be implemented with out of the box features? To ensure seamless upgrades to future versions of the new product? When you are working with a ServiceNow product, chances are pretty high that this is the case.
So what exactly is out of the box? It seems easy to refer to something as out of the box if it is already there, but what if we are talking about a customisable piece of out of the box functionality? Like notifications or forms and fields? As consultants we need to play with this ‘definition’ each time we work in an implementation.
Continue reading…»

Thoughts on design quality and its measurement

General No Comments »
by:

Implementation of functionality can vastly differ between organizations and sometimes even between consultants from within the same organization. This is due to the fact that the mind is unique for everyone and decisions are based on a mix of facts and hunches. The variety that is caused by this, makes it difficult to determine the proper practices that are needed to maintain quality across tool functionality, or even across organizational implementations.

Quality is embedded in the way designs originate, are actualized and maintained. I’ve been working as an implementation consultant for quite some time now, and I have noticed that the rigors of proper quality management during development and design phases is often lost because of external factors, time pressure and/or lack of knowledge.

It is hard to define the concept of quality as one of measurements that are testable and iterable. Yet it is one of the key components in determining perception of quality for your customer. And it is not a new practice. We perform to provide the maximum amount of quality as long as we can remain in the boundaries that are set by time, money, effort, knowledge, etc. Quality, or the perception thereof, however differs greatly between designs.

Continue reading…»

Using JS objects for your own needs

General 2 Comments »
by:

One of the benefits of an object oriented language, is the ability to instantiate classes and manipulating the instance of that class.
Current is an instance of a GlideRecord.
The constructor or class of an object is always the ‘template’ for an instance of that specific object.
Even new Object has the constructor Object.

In javascript, var x = new Object or var x = {}, will create an instance of Object in variable x.

This is not surprising for a OOP-language.

One of the biggest benefits of this however is the flexibility it provides.
Now we know that current is an instance of a GlideRecord, we know it can be manipulated as any instance can.
Imagine we’d be creating a before business rule and want to use (or abuse??) the current object that is available.

Try the following two business rules:

Name: Before BR
When: Before
On: Insert, Update
Script: current.nvar_test_value = ‘Hello! I am being transferred from the before to the after current object.’;

Name: After BR
When: After
On: Insert, Update
Script: gs.print(current.nvar_test_value);

Put them on a random table and either create or update a record.
Also note that prints will only appear when you have your debugger on, so make sure its running.
Continue reading…»

Building a custom script Search widget

General 6 Comments »
by:


The flexible platform that ServiceNow is has more than once challenged my capabilities of analysis. Especially errors that occur during the development of complex functionalities for a customer can sometimes be challenging.

JSLint will occasionally throw warnings and other log statements that unbeknownst to the user are actually small coding mistakes. Making mistakes is a human characteristic, so this isn’t necessarily bad, but it would be a waste to not try and fix them.

org.mozilla.javascript.EcmaError: “security_admin” is not defined.
Caused by error in <refname> at line 1

==> 1: security_admin

The above warning is not killing the system, nor is it influencing the functionality. Tackling it could however improve performance or fix some unknown missing functionality. I’ve been tasked in the past with debugging assessments on multiple ServiceNow instances and felt the log was lacking in a method of quickly finding the culprit in statements like this. I therefore coded a little solution for this myself which consists of 3 separate parts:

  • Script include
  • UI page
  • Adding it to a widget (bonus)

I’ll explain the basics of the components in both scripts, and give a step-by-step guide through the script. As this was sort of a nifty challenge for me, I disregarded the way this can be done with Global Search as well by setting up a new search group. Also note that the widget will basically be able to dynamically create the search groups, based on the element types looking for. You should however consider this fact when implementing the update set.

Ok, let’s get started.

Note:
You can download a zip file containing an Update Set using the download button below.
[download id=”1″]
Continue reading…»

Pre-attached attachments for the ServiceNow email client

General 11 Comments »
by:

Inject here please!
For some customers it could be useful to pre-attach attachments of the record to mails sent from the email client. Or perhaps automatically attach a document like terms of service. The email client has the wonderful ability to do this by preloading the attachments of the email record. Imagine the following scenario: A client needs to be able to automatically send all existing attachments of the record with every email. This includes the notifications sent through via the email client. You can make that happen.

Adding a business rule

Every time the notification icon is pressed (the little envelop in the top form bar ), and the email client is loaded, a record in the sys_email table is created. To attach any documents from the attachment table to any email from the client, ServiceNow will create an attachment record for that particular sys_email record and make a connection between them. Knowing this, you can use this feature by creating a before business rule that adds attachments to the sys_email record on insertion. So create the following business rule on sys_email:

// get the hasmap from the GlideURI
try{
var map = gs.action.getGlideURI().getMap();
var table = map.get(‘sysparm_table’);
var sid = map.get(‘sysparm_sys_id’);

if (!table.nil() && !sid.nil()) {
    // copy the attachments from the “source” incident
    Packages.com.glide.ui.SysAttachment.copy(table, sid, current.getTableName(), current.sys_id);
}
} catch (err){}

With some gratitude towards a contributor on the community forums (http://community.service-now.com/forum/8662), you are able to attach stuff quite easily. The package method being called copies existing attachments to records. The GlideURI is a way of sending parameters and thereby actions through the system. In this case, it contains enough data to copy attachments to email client emails.

When you now add attachments to the record and open the email client, the email will automatically contain the attachments. Sounds easy enough, but…..
Continue reading…»