Monday, January 19, 2009

ITSM Tip for the week: Opening Self Service to a new Incident not the dashboard

Normally in ITSM  (and in all 5.x versions)  linking to Self Service would involve going to the users dashboard via the http://[itsmserver]/Servicemanagementweb/SelfServiceLogin.aspx where [itsmserver] would be the name of the server (without the []).

In 6.1.x you can now link directly to an object with the following format.

http://[itsmserver]/ServiceManagementWeb/IntegrationInfo.aspx?CommandName=SHOWSINGLEBUSOB&Role=SelfService&Param1=Incident&Param2=[RECID]

where [itsmserver] would be the name of the server and [RECID] is the RecID of the object you would like to open (without the []).

You can use the same formatting to link directly to a new object in SelfService. For example, if you wanted a self service user to go straight to the new incident screen without having to go to the dashboard and then click the "new incident" option. You can use the same format as about but simply leave out the [RECID]

http://[itsmserver]/ServiceManagementWeb/IntegrationInfo.aspx?CommandName=SHOWSINGLEBUSOB&Role=SelfService&Param1=Incident&Param2=


Monday, January 05, 2009

ITSM Tip for the week: Adding a count to the Journal Tab

I’ve had a whole host of customers ask for this so I thought I'd add the details up. The script below counts the number of Journals that are related to the incident. 

How I’ve been using this script is to display the journal tab as “Journals (1)” (like the tabs in a HEAT system does). To do this you will need to add a field to the Incident that stores the Journal count (which I usually call JournalCount). Assign the script to the Field as a Calculation. Finally change the label of the tab to be a Named Expression. That Named expression should be of the Simple Calulation Type and would look something like this -> 'Journals ('+TRIM('{$[FIELD]Incident.JournalCount$}')+')'. 

The same principle will also apply for any other tab.

Journal Count Script 

import System

import Fusion

import Fusion.Api

 

class FusionScriptWrapper implements IScriptWrapper

{

     function FusionScriptWrapper()

     {

           // place constructor logic here

     }

 

     function Process(currentBusinessObject : Fusion.Api.BusinessObject, currentField : Fusion.Api.Field) : Object

     {

           var objReturn : Object

           var numberofjournals : int

          

           // Initialisation

           objReturn = true

          

           // Get all the Journals

           var bizCollectionJournals : Fusion.Api.BusinessObjectCollection

           bizCollectionJournals = currentBusinessObject.GetRelationship("IncidentContainsJournal").BusinessObjects

          

           // Check for Journals from the Relationship

           if(bizCollectionJournals != null)

           {

                     // Count the number of Journals

                     numberofjournals = bizCollectionJournals.Count

                     objReturn = numberofjournals

               

           }

 

          // Return the number of Journals

          return objReturn

     }

}