USD – Resolve Case Tab Name

Within Unified Service Desk (USD) you can name tabs, typically this is done with one of two approaches.

The first is simply to set the display name on the hosted control to a fixed value. Such as “My Work (Global)”. This has the effect of making the tab name always the text entered.

The second is to use replacement parameter to make the tab name dynamics. Such as “[[contact.fullname]+]”. This has the effect if making the tab name dynamic with it being set to the contacts full name. (In this example.)

But there is a third approach which gives greater control, the third way is to call a scriptlet to dynamically set the tab name with code.

One example of when you might want to use this approach is on the cased tab. If the user opens an existing case setting the tab name to the case title is useful. But when they are creating a new case you might want the tab name to read “New Case”.

Below you can see that the display name on the hosted control for incident (case) is [[$Scriptlet.ResolveCaseNameTitle]], this has the effect of calling a scriptlet to set the tab name.

Then the scriptlet looks like this:

The code in the sc riptlet will look for a title, if one hasn’t been set yet this implies the case is a new case. And instead of setting the tab name to be blank it uses “New Case”.

This is a pretty simple sue of scriptlets and one I hope you find useful.

function ResolveCaseNameTitle() {
  if ("[[incident.title]+]" != "") {
    return "[[incident.title]+]";
    return "New Case";

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s