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

Tags and Keywords

Comments

Oct 19, 2017 08:01 AM

You're welcome! 

Oct 19, 2017 04:48 AM

Thanks , and really appreciate your Professional and quick response  , this really helpful and  its works like a charm 

Oct 18, 2017 09:44 AM

Hi,

 

Yes, you can display the link in the External System Ticket field..  Here's a working example.  

 

 

<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;
var value = '<a href=' + cascRequestLink + ' target="_blank">Service Catalog Request: ' + cascRequestID + '</a>';
if(cascCheck == "CASC" && typeof cascRequestID != "undefined" && cascRequestID != "" && "$prop.form_name_3" != "edit"){
detailTextbox("External System Ticket","",2,1,20,"0","4000",value,"no","no", "", "2","no", "0");
}
else{
<PDM_MACRO name=dtlReadOnly hdr="External System Ticket" attr=external_system_ticket colspan=2>
}
<PDM_ELSE>
<PDM_MACRO name=dtlTextbox hdr="External System Ticket" attr=external_system_ticket colspan=2 keeptags=yes>
</PDM_IF>

 

To implement this, replace the following line.

<PDM_MACRO name=dtlTextbox hdr="External System Ticket" attr=external_system_ticket colspan=2 keeptags=yes>

With the code provided above.

Oct 18, 2017 04:50 AM

HI , this is a great document that really helps ,

i have a question if there is any way to have the link on the external ticket instead of having a button , or is there is any way to have the ticket number with in the button caption instead of service catalog caption ? 

May 26, 2017 01:07 PM

Hi Franciscovilo,

 

There is out of the box integration with Service Catalog that is configurable in the Options Manager.  When you change the Service Catalog Integrated option, the following line is changed in each servers nx.env, NX_CASC_INTEGRATED.  The functionality I provided checks to make sure this value is set to YES, and if so will conditionally display a Service Catalog link when External System Ticket is not empty.  The Options Manager setting NX_CASC_ENDPOINT is the webservice URL for your Service Catalog instance.  This URL is pulled into the form and is split in parts to build the necessary URL to access the Service Catalog request.

 

Let me know if this is the explanation you were looking for. There is already an out of the box integration to sync status and activity logs, we use this to keep the SC request up to date with activities from the SDM request.  Once the SDM request is closed, the SC request is automatically Completed.

May 26, 2017 08:28 AM

Hi Grant,

Thanks for the case exposed, but I think is necessary to have implemented an integration between Service Desk and Service Catalog, could you, please, explain how did you perform that integration?.

 

Thank you very much

Best Regards

Francisco V.

Related Entries and Links

No Related Resource entered.