Message Triggers

General 1 Comment »

When implementing Integrations to external systems the normal way to trigger outbound messages is by using Business Rules and Script Includes that will validate and decide if a message needs to be transmitted to external systems.

The concept that I am going to discuss uses a different data driven approach:

Message triggers.
It has some specific advantages, I will list them below.

Continue reading…»

What the LOG object can do for you…

General No Comments »

Recently a respected and very knowledgeable colleague of mine posted an article about finding specific information in the ServiceNow Wiki.
Wonderful, Wiki is a great source for information, but what if the specifics you are searching for are not available from Wiki?

Let me give you an example….

Wiki says the following:

Variable name Type Description Usage Example
log Function The log object for the current import run. For example, STRING ),
log.warn( STRING ),
log.error( STRING )“An error has occurred”)
log.warn(“An error has occurred”)
log.error(“An error has occurred”)

But what can the log object do more for you??

Well, check the following:
Continue reading…»

Implementing Customer Specific Web Services

General 1 Comment »

ServiceNow currently offers the following flavors for inbound Web services:

  1. Direct Web Services
  2. Web Service Import Sets
  3. Scripted Web Services

To my opinion one type is failing here:

• Customer Specific Web Service

What I describe here will easily enable you to implement a custom WSDL of your integration Partner in ServiceNow.
Of course we don’t re-invent the wheel but use as many existing components as possible.

Let’s suppose that we need to implement a very simple incident creation process using the following Customer WSDL:
Continue reading…»

How to reduce Server roundtrips during Client processing

General 2 Comments »

In this short article some useful information that allows for optimizing ServiceNow performance.

During catalogue processing it often happens that specific user-related-information must be displayed (e.g. Company, Phone, Cost Center, etc.).
This article describes a method for preventing unnecessary roundtrips to the Server when displaying this information on the Client.

By storing the most used information we might need later in the Session object, this data can be easily retrieved in a Client script.
The best moment for storing this data is during processing the session.established event.
The example below (click to enlarge) shows some customized data and normally would be replaced with data that is important for your personal instance.


Continue reading…»

Working with date Date fields in Imports and Business Rules

General 1 Comment »

Working with Date fields in imports, field default scripts, business rules and all other places where you can use Server based Javascript is often seen as complex.

This is caused by all kinds of automatic conventions taking place.

  • All DateTime fields are internally stored in SNC in UTC format.
  • All DateTime fields are displayed in User format.
  • All DateTime fields entered using a User account are converted from user format and TZ to UTC format.
  • All DateTime fields filled with a string from Javascript are stored directly as UTC format.

Daylight Saving Periods make it complex to compute an exact LocalTime based on the UTC format.

To make Imports reproducible it’s advised to know under which credentials an Import or Scheduled job runs.
The fields ‘Run As’ and ‘Run as TZ’ are out-of-the-box not displayed in the Scheduled Jobs.

Continue reading…»