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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×