SATURDAY, MAY 19, 2012

Posts Tagged ‘Scripting’

O
ne common problem I encounter with Service-now deployments has to do with the sharing of a field between many tables extended off of the same parent table. Because the Task table and the Configuration Item table make heavy use of extended tables this is where I see the problem most often. What is the best way to make changes to a shared field for the table that I’m working on, but not impact other tables that may be using the same field?

Let’s say that I’m in the middle of a Change management deployment and I’m using the ‘Configuration item’ field on my Change form. At the same time, my company is trying to roll out Incident management so there’s also someone from another department trying to make configuration changes to the ‘Configuration item’ field on the Incident form. The Incident management process says that the Configuration item field is optional while Change management says that it should be mandatory. Incident management has a very complex reference qualifier for the field, but Change management doesn’t want a reference qualifier at all. Since there is only one dictionary entry for the Configuration item field, we can’t both have our way if we are making configuration changes on the dictionary entry. Below are a few of the common scenarios where you might see this problem and how you can make it work for all tables that access the shared field.

Learn more ...

I

f you’re new to Service-now you’re probably realizing that there are a lot of cool things that you can do with the product.  In most cases, the functionality you need is already set up and ready to go.  Other things can be accomplished by installing a plugin that fits your particular need.  In my experience, there are a few plugins that end up being used (or should be used) on almost every Service-now.com installation.

Learn more ...

S
tandard JavaScript provides 3 different types of popup boxes:  Alert box, Confirm box, and Prompt box.  Since Service-now.com supports standard JavaScript, these popup boxes can be used anywhere in the application where client-side JavaScript is supported.  They will most commonly be used in an ‘onSubmit’ client script or a UI action with the ‘Client’ checkbox checked.  Below are some examples of how each of these popups could be used within the context of a Service-now implementation.

Learn more ...

S

ervice-now.com provides a very robust and simple way to manage your tasks and approvals (among other things) through its graphical workflow engine.  It is very common to use graphical workflow to help facilitate some change management process within your organization.  One common requirement in change management is to be able to cancel or close the change request at any time during the process.  “Simple”, you say.  “Just allow the user to change the value of the ‘State’ field to ‘Closed’.”

You would not be incorrect in saying something like that, but you would be forgetting about part of the problem with closing or canceling a change request or other task ticket.  What if the attached workflow(s) still think that the change request and its associated tasks and approvals are still in progress?  Should the attached workflow context(s) continue to run indefinitely?  If your workflow doesn’t have a way to know about the completion of the change request then it will continue to run (or more likely just sit and be forgotten).

Learn more ...

UPDATE: Most of this customization can be accomplished through the use of system properties described here (transparent image, gradient background). Whenever possible, these properties should be used in place of the customization described below.

Service-now.com custom header

S

ervice-now.com allows you to brand your Service-now instance by uploading any image to the primary company record in your instance.  The result of this branding is an instance showing your custom logo in the top-left corner of the screen on top of a plain white background.  This type of customization works great but some customers want to take this idea even further and really tweak the look of their header.  Maybe they want to add some links in the header or they want a custom background to better match their corporate branding.

Learn more ...

UI

scripts in Service-now are one of those things that can be very useful but aren’t very well known.  They allow you to do a lot of client-side javascript manipulation of places in the form that you might not otherwise be able to get to.  One good example of this is setting the browser window title dynamically based off of the content of records being displayed.

Learn more ...

I

often see clients request the ability to copy task records.  There are a variety of ways to implement copying functionality and each method has its trade-offs.  Templates, a checkbox field combined with a business rule, or even activating the ‘Insert’ UI action buttons for the task table are all methods that I’ve seen.

In my experience, the best method is to create a brand new UI action button on the table in question.  Below is a script I created to add a ‘Copy’ button to the ‘Change request’ form. This script should be pretty complete for most implementations.  You may just have to customize a few lines to copy over the appropriate fields.  The main advantage that this script has over other methods is that it also copies all of the ‘Affected CI’ records, Change tasks, and attachments for both the Change request and all Change tasks.

Learn more ...


Latest Comments

  • Jim Coyne: I’m not sure exactly what you are looking for, but can you use “window.location” in your...
  • Ian: Might want to check the single quotes around ITIL in the condition line, they gave an error for me until I...
  • Mark Stanger: That’s correct. This returns instance URLs. I don’t have an equivalent currently that...
  • ND: Hi Mark, This is very useful information. I am looking for similar method to find URL of a site created by us. We...