CA Service Management

 View Only

Display Service Catalog Request Link on Associated Service Desk Request 

Jan 21, 2017 02:48 PM

Hi Community,

 

The following customization will conditionally display a Service Catalog button on a Service Desk Request or Incident, linking it to the Service Catalog Request.  The out of the box Create Incident Service Catalog action will write the Service Catalog Request Item ID and Request ID to the external_system_ticket field in Service Desk.  To display the Service Catalog link from Service Desk, we need to check if external_system_ticket starts with CASC and if so, grab the last set of numbers, which relate to the Service Catalog Request ID.  Then we can add the Request ID to the end of the URL that is generated for the Service Catalog button.

 

This customization involves adding a few lines to detail_cr.htmpl and detail_in.htmpl.  It requires that NX_CASC_INTEGRATED  be set to Yes, and have a valid URL entered for NX_CASC_ENDPOINT.  The NX_CASC_ENDPOINT url is split into parts using the / as a delimiter.  This is then fed into the variable cascRequestLink with the remaining pieces of the URL tacked onto the end.

 

 

  1. Add the following code to detail_cr.htmpl and detail_in.htmpl
    • detail_cr.htmpl: This code should be added after <PDM_MACRO name=dtlForm factory=cr>
    • detail_in.htmpl: This code should be added after <PDM_MACRO name=dtlForm factory=in>
<PDM_IF "$args.external_system_ticket" != "" && "$env.NX_CASC_INTEGRATED" == "Yes">
var cascRequestStr = "$args.external_system_ticket";
var splitCascRequestStr = cascRequestStr.split("-");
var cascCheck = splitCascRequestStr[0];
var cascRequestID = splitCascRequestStr[2];
var cascSvcLink = "$env.NX_CASC_ENDPOINT";
var splitCascSvcLink = cascSvcLink.split("/");
var cascRequestLink = splitCascSvcLink[0] + "//" + splitCascSvcLink[2] + "/usm/wpf?Node=icguinode.requestprofile&Args=" + cascRequestID;
if(cascCheck == "CASC" && typeof cascRequestID != "undefined" && cascRequestID != ""){
<PDM_MACRO name=button Caption="Service Catalog[S]" Func="window.open(cascRequestLink, '_blank')" hotkey_name="Service Catalog[S]" ID=SC_LINK>
}
</PDM_IF>

2. Clear the webcache

  • pdm_webcache -H

 

Statistics
0 Favorited
13 Views
0 Files
0 Shares
0 Downloads

Related Entries and Links

No Related Resource entered.