KB How "Attach to incident" works ?

pradeepgupta
Giga Expert

Hi All,

While referring Knowledge Article to any incident/problem, how "Attach to incident" button works.

When we click on "Attach to incident" than, knowledge article gets attached to incident/problem, I wanted to understand the working of this button.

Actually I need to do some customization in it, like where to attach, which field of incident will be filled with knowledge article detail etc.

20 REPLIES 20

got it, should be in ui macro "kb_view_attach_button".


Actually requirement is like I don't want to touch the OOB functionality and create own customized knowledge process, I am not sure the places where I need to make changes?



Hierarchy is   kb_view(UI Page) -->>kb_view_attach_button(UI Macro)-->>KnowledgeFunctions(UI Script)-->>kbAttachArticle(SI)


Unfortunately it is not always possible to make customizations without touching any OOB records. If you do not want to modify a UI page or macro, you can try writing a UI script that would dynamically modify the Document Object Model (DOM) on page load.



To be able to give you any specific recommendations, I would need to have more details of the customizations you are trying to make.



By the way, what version of ServiceNow are you using? Knowledge Management has been significantly enhanced in Fuji. Details are already available on the Wiki:


Knowledge Management - ServiceNow Wiki


You will need to define the new function in a UI script (can be "KnowledgeFunctions" or a new one) and update onClick event handler of the button (either in "kb_view_attach_button" UI macro or in "kb_view" UI page depending on the ServiceNow version you are using).


Hi Slava. Can you think of any reason why kbReturnAttach2 function in the KnowledgeFunctions UI Script might not work consistently? We have not modified it, but it sometimes seems to get stuck and doesn't close the window or attach the article to the Comments field... even though the KnowledgeAjax fires and attaches the incident number to the KM.



Can't figure it out... other than it seems to happen with articles that have several images in them.


natem
Giga Contributor

Line 164 is missing a semi-colon... hmmm