how to add knowledge icon next to short descrption
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2017 12:34 AM
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??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2017 01:20 AM
I normally just add the knowledge_search=true attribute as either the attribute, or the dictionary override attribute for that table:
knowledge_search | true/false | string fields | If present or true, causes a knowledge search icon (a small book) to appear next to the field. Clicking this icon launches a pop-up window for searching the knowledge base, unless a custom knowledge search function has been specified (see knowledge_custom). |
http://wiki.servicenow.com/index.php?title=Dictionary_Attributes#gsc.tab=0
http://wiki.servicenow.com/index.php?title=Dictionary_Overrides
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2017 01:33 AM
In short description, check if there any dictionary override for incident.
Can you share how the UI macro is setted in short description field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2017 01:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2017 02:05 AM
Can you please change the macro name and check ?
It tried with name as "kb" and with same attributes, its working for me.