Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

how to add knowledge icon next to short descrption

swathib
Mega Contributor

I want to add Knowledge icon beside short description on incident form.For this i have tried creating UI Macro and setted the UI macro in "Short description" Attribute field.

But it is not working...

Below is the UI Macro:

<?xml version="1.0" encoding="utf-8" ?>

<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">

<a id="${jvar_n}" onclick="searchKnow()">

<img src="bulb.png" width="17" height="20" title="${gs.getMessage('Search Knowledge')}" alt="${gs.getMessage(Search Knowledge')}"/>

</a>

<script>

function searchKnow() {

    var searchText = g_form.getValue('short_description');

    var url = 'kb_find.do?sysparm_search=' + escape(searchText);

  url += '%26sysparm_nameofstack=kbpop';

  url += '%26sysparm_kb_search_table=incident'; //This example runs on the Incident table. Edit the table name as necessary

  popupOpenStandard(url, "kb2task");

}

</script>

</j:jelly>

Can anyone help me??

6 REPLIES 6

Hi Rakesh,



Now it is working .....


Thankq


Hi Rakesh,



But after clicking the book icon beside short description URL's are redirecting to as below:(see the difference between custom URL's and OOB (kb_find and kb_view URL's)



find_real_file.png



Can you please suggest me how to get that redirection...Actually im checking the kb_find and kb_view ui pages..not able to understand...