CA Service Management

 View Only

Add button to get ticket url! 

Oct 30, 2015 02:14 PM

Hi guys, last week i've made something that everyone find very usefull. So i'm gonna share it with you and hopefully your users will thank you.

 

When someone want to send a email with a link to a specific ticket, this button paste the ticket url to the clipboard.

 

This example is for detail_in.htmpl

 

function CopyToClipboard()
{
   var text="http://servicedeskServerAddress:8080/CAisd/pdmweb.exe?OP=SEARCH+FACTORY=cr+SKIPLIST=1+QBE.EQ.ref_num=" + "$args.ref_num";
   if (window.clipboardData && clipboardData.setData)
   {
       clipboardData.setData('text', text); 
       alert("URL pasted to clipboard");
   }
}



ImgBtnCreate("COPYURL","URL",
  "CopyToClipboard()", true, 0);

 

Ce document a été généré à partir de la discussion suivante :The specified item was not found.

Statistics
0 Favorited
7 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

Feb 13, 2020 02:23 PM

This would be very useful for some of my folks.

Where exactly does this code get entered? which form or htmpl file and in any specific are of the file?


TheKatherine

Nov 02, 2015 09:21 AM

You know what, i use this attribute with PAM and Notification and never thought to use it in a web form. Good idea.

Nov 01, 2015 08:53 PM

You win :)

Nov 01, 2015 05:18 PM

I am just wondering if is there any reason why you did not used web_url atribute value?

e.g.

clipboardData.setData('text', $args.web_url); 

Oct 31, 2015 02:33 AM

sorry for boreness,

but you can build an universal URL which will work for any detail_* form without any special defenition:

?OP=SEARCH+FACTORY=" + "$prop.factory" + "+SKIPLIST=1+QBE.EQ.id=" + "$args.id";

because each object in system have factory and id

Related Entries and Links

No Related Resource entered.