Jump to content
sdemirayak

KT Log Solution activity

Recommended Posts

Hi all

I use 14.1

has anyone tried to open KB document from the list_alg directly instead of Knowledge Management tab?

If log type is "SOLN", let the link open the kb document when I click on that log. So I do not have to go-> Knowledge managment tab->Solutions. 

do you think its possible?

Share this post


Link to post
Share on other sites

Hi,

why do you need it in the Act_Log? You can show all KD-Documents directly in the ticketform. it can be helpful if you have more than one KD entry or more than one log page....

<PDM_MACRO name=dtlStartRow>
document.writeln('<TR><TH ALIGN=LEFT class=detailro colspan=5>Knowledge-Documents</TH></TR>');
<PDM_LIST FACTORY=kdlinks PREFIX=kdlinks WHERE="cr='$args.persistent_id'">
<PDM_MACRO name=dtlStartRow>
detailSetRowData('&bull; <a href="?OP=SHOW_DETAIL+PERSID=KD:$kdlinks.kd+HTMPL=kt_document_view.htmpl" target="_blank">$kdlinks.kd - $kdlinks.kd.TITLE</a>');
</PDM_LIST>

 

Share this post


Link to post
Share on other sites

hi Henning, I want to make eaiser the usage of servicedesk for analysts. Service Desk checks every ticket for kb document. It will be easier if they see document from list_alg directly.

Share this post


Link to post
Share on other sites

There is an existing function (fmtType) in list_alg.htmpl that you can use for it... I copied it and changed the function a little bit:

 

function formatKD(value)
{
	//format stuff
	var ret;
    ret =nx_unescape(value);
    ret = ret.replace(/(<BR>\s*){3,}/ig, "<br><br>");
    ret = "<br>" + ret + "<br><br>";
    rs.data(ret); 
	//Change description to KD
	var alghtml;
    var argCRPersidEscaped = nx_escape(listcall_req_id);
    var argCRType = listCRType;
    var arrtmp = listcall_req_id.split(':');
    var argID = arrtmp[1];
    var argFactory = arrtmp[0];
    if (listtypecode == "KTSOLN" || listtypecode == "KTREJECT" || listtypecode == "KTSUBMIT")
	{
	alghtml = "<A CLASS=record TITLE='Click here to see the Knowledge-Documents" + listsession + 
			"' HREF=\"javascript:popup_window('','SHOW_DETAIL', 0, 0, " + 
			"'directories=no,location=no,menubar=no,status=no,gobutton=no,menubar=no','PERSID=KD:" + listsession + 
			"', 'HTMPL=kt_document_view.htmpl', 'opener=search_tools', 'open_mode=2', 'reload=1', 'SOLUTION_OF=" + 
			argCRPersidEscaped + "', 'disable_solution_survey=true', 'TICKET_FACTORY=cr', 'SOLUTION_OF_ID=" + argID + "'," +
			"'PATH_IDS=" + listaction_desc + "')\">\n";
		alghtml += value;
    		alghtml += "</A>\n";
	rs.data(alghtml);
	}
}

Attach the function for example to the description field (Eof):

<PDM_MACRO name=lsCol hdr="Description" attr=description escape=JS2 export=no fmtfunc=formatKD justify="line" sort=no>

The function formats like fmtfunc=UnEscapeDesc....

 

You can also add some text in front of the link:

alghtml = "Knowledge-Document: <A CLASS=record TITLE='Click here to see the Knowledge-Documents" + listsession +  .....

 

Edited by henning1518

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...