Handling variable coalesce in transform maps

General No Comments »

Sometimes a functional request might look difficult, but after taking a closer look the solution can be easy….

When creating a transform map for importing records in a target table, you can set the coalesce on one or more field maps. This way you can find the corresponding target record.

The wiki of Service-now.com describes this on http://wiki.service-now.com/index.php?title=Creating_New_Transform_Maps#Creating_a_Field_Map

Our customer asked us to create a Transform Map where the unique key is not always on the same field maps. So for example if you are creating a transform map for importing users into the sys_user table, you must be able to define the correct user record on the AD account ór employee number.

The problem

If you do it the normal way, you would set the coalesce on 2 field maps (AD account and employee number) however, when the source record has an incorrect value for the employee number and a correct value for the AD account, the result will be an “insert action” for this user since the target record isn’t found.

We have found a simple and effective solution.
Continue reading…»

Capturing end user feedback at Incident Resolving

General No Comments »

Let me capture that...

In the ServiceNow out of the box setting there is a button which allows the user to resolve the incident. This button sets the incident to state Resolved.
This functionality is provided by a UI Action and a Business Rule. However, all incidents that are resolved this way are provided with a standard ServiceNow text.

Below I’ve included the ServiceNow out-of-the-box UI Action and Business Rule that facilitate the default functionality.


UI Action 


Resolve Incident 


(current.incident_state != 7 && current.incident_state != 6) && (gs.hasRole(“itil”) || gs.hasRole(“itil_admin”) || current.caller_id == gs.getUserID())


current.incident_state = 6;



Continue reading…»

Pre-attached attachments for the ServiceNow email client

General 10 Comments »

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
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…»

Unexpected behavior using ServiceNow Domain functionality

General No Comments »

We have a client that stretches the possibilities of the ServiceNow domain separation to the max.
In this article I would like to share an example of something that didn’t go as expected….

The domain structure:









Continue reading…»

ServiceNow Security Tips

General No Comments »

securemanSecurity is always a topic of discussion during an implementation. guard

The specific requirements always differ per customer and are often – if not always – based on company policies and personal preference. ServiceNow offers a wide range of options to enhance data- and system access security on an environment. This blog focuses on some basic “good practice” approaches on creating and maintaining data security.

More information about overall security is outlined on the following WIKI-link: http://wiki.service-now.com/index.php?title=Security.

Your best friends in configuring data security are ACL rules.

How they work and how they should be used is very well described on the ServiceNow Wiki-pages.
You can find more information about the configuration of these ACL on http://wiki.service-now.com/index.php?title=Using_Access_Control_Rules.

Continue reading…»