Display KB Articles Your Way

Pseudo Silk Kimono...

I don't know if it bothers anyone else, but it really bugs me the way KB Articles are displayed in the case entity within CRM 4.0. The problem is there is that the KB Article is displayed by a custom control on the form which cannot be customised. Not only do KB Articles share a form tab with Notes, but you have to click a checkbox to display your selected article - I never understood this design "feature". But by far and away the worst problem is that you can't change the size of the KB Article viewer, so that even for the shortest article you can only see a few lines of text at a time.

Default Case Form Layout

After a little digging around the page using the Internet Explorer Developer Toolbar, I found out that the KB Article custom control was nothing more than a glorified IFrame, displaying the "/CS/articles/viewer/default.aspx" page and passing the Article Id as a parameter.

The easiest way to expand the KB Article window is to replace the custom control with a standard IFrame and a few lines of JScript. However, by default the section containing the control is locked preventing you from deleting it within the form designer. Luckily, you can modify this behaviour by exporting the case entity, modifying the XML file and re-importing.

The first step is to change the "locklevel" attribute on the "section" element from 1 to 0.

Locklevel Attribute

Next, delete the the JScript event code that passes the Article ID to the KB Article custom control.

JScript Event Code

Finally, delete the row that contains the custom control itself.

Custom Control

Once you have saved the change, re-imported and published them to CRM, you can go ahead and just use the standard customisation tools to create an IFrame and some custom script on the form OnLoad event and the kbarticleid OnChange event. After a couple of minutes work, I ended up with something much more useable than the out-of-the-box KB Article viewer.

New Case Form Layout

I've attached a copy of my customizations.xml file here for you to import into your own CRM system. However, bear in mind that if you have already modified the case entity, then you may lose your customizations.

This posting is provided "AS IS" with no warranties, and confers no rights.

Laughing Boy

customizations.zip