Changing the Incident Preview Form

When dealing with Incidents, you and your Service Desk people always want the most important information at hand to work effectively. One requirement could be to display information about incidents without opening them. Out of the box this is possible and the SM console displays the most important information about a selected Incident in a preview form. This is indeed helpful, but what if you want to display other information in the preview? Well, that’s possible with a little bit of advanced customization. Just read on …

Before we start let’s have a quick look at the situation without any customization. I’m sure you are very familiar with this …


Now let’s take a look at the two needed steps to change the default preview form.

Step 1 – Management Pack

First of all I create a new Management Pack and add some references:

<ManagementPack ContentReadable=”true” SchemaVersion=”1.1″ OriginalSchemaVersion=”1.1″ xmlns:xsd=”” xmlns:xsl=””>
<Reference Alias=”EnterpriseManagement”>   <ID>Microsoft.EnterpriseManagement.ServiceManager.UI.Console</ID>
<Reference Alias=”Incident”>
<Reference Alias=”AuthoringForms”>        <ID>Microsoft.EnterpriseManagement.ServiceManager.Authoring.Forms</ID>
<Reference Alias=”WorkItem”>

Next I need to create a Type Projection. It uses the Incident class as the seed class and has two components, the “Affected User” and the “Assigned to” User of the Incident. This is needd because I want to display details about the affected user in the preview form. Check the Alias of the components as they are very important to later bind the data to the form.

<TypeProjection ID=”TypeProjection.Incident” Accessibility=”Public” Type=”Incident!System.WorkItem.Incident”>
<Component Path=”$Target/Path[Relationship=’WorkItem!System.WorkItemAssignedToUser’]$” Alias=”AssignedTo” />
<Component Path=”$Target/Path[Relationship=’WorkItem!System.WorkItemAffectedUser’]$” Alias=”AffectedUser” />

The next section defines the categories. The first category is a default category, the second category is used to declare the form with the ID “form.incident.preview” (which is defined later in the MP) as the preview form for Incidents.

<Category ID=”Category.Basis” Value=”EnterpriseManagement!Microsoft.EnterpriseManagement.ServiceManager.ManagementPack”>
<Category ID=”Category.Incident.Preview” Target=”Form.Incident.Preview” Value=”EnterpriseManagement!Microsoft.EnterpriseManagement.ServiceManager.UI.Console.OverviewForm”>

In the presentation section of the MP, I need to define the preview form and configure the target, in this case the type projection in this MP. The assembly comes from Visual Studio (described later) and will be bundled together with the MP. Because one assembly could have more than one form, the “TypeName” defines what form to use. This needs to match the xaml-file in the Visual Studio project, but we’ll see that later.

<Form ID=”Form.Incident.Preview” Accessibility=”Public” Target=”TypeProjection.Incident” Assembly=”assembly.incident.preview” TypeName=”Incident.Preview.Preview”>

Nothing special in the languages section …

<LanguagePack ID=”ENU” IsDefault=”false”>
<DisplayString ElementID=”Incident.Preview”>
<DisplayString ElementID=”Form.Incident.Preview”>
<Description>Incident Preview Form</Description>

In the presentation section I referenced an assembly. Now in the resources section of the MP, that assembly needs to be declared. The filename is important later when the MP is bundled together with the MP.

<Assembly ID=”assembly.incident.preview” Accessibility=”Public” FileName=”Incident.Preview.dll” HasNullStream=”false” QualifiedName=”Incident.Preview, Version=″ />

That’s it with the MP part. Now, lets create the preview form.

Step 2 – Create the Preview form

In Visual Studio I create a new User Control project – I call it “Incident.Preview”.


Next I delete the UserControl1.xaml file and create a new xaml file with a meaningful name – in my case I select “Preview”.xaml”. This name (the form name) is important because it is referenced in the MP, remember? If not, check step 1 again.


Now comes the fun part – forms design! I’m not really good in this, so I will keep it very simple 🙂 I drag the needed controls for the preview to the form and do the needed formating. Because the preview form is read-only, I only use label controls.


As soon as the formating is done, the data binding needs to be configured. Instead of using a label text, I just need to define what information should be displayed by binding the label text to the attribute of interest. In this example I want to display some information about the affected user of the selected Incident.


As you can see, the label content has no text but contains a binding to the needed property. I’m configuring a form for the Incident class, but I want to display information about the affected user. This is where the MP with the Type Projection and the components (Affected User) comes into play. The Alias of that component is used together the property name. In the example below the Alias is “AffectedUser” and the property name that holds the value that I want to display is “Company”.

<Label Content=”{Binding Path=AffectedUser.Company}” …

Now let’s build the User Control in Visual Studio. After that you can copy the dll file from the projects folder and store it in the same folder as your MP file, so that they can be bundled together. To do the bundling we need the well-known “new-mpbfile.ps1” script.


After the files have been bundled, import the bundle and (after restarting the SM console) check if the preview form shows up as expected. Just mark an incident and check the form. Cool, huh?


OK, the design could be better, but this is your job now Smiley

Update: You can download the VS project here –>!/?cid=5752db4b025958b6&sc=documents&uc=1&id=5752DB4B025958B6%21253


About Marcel Zehner

Microsoft Azure MVP
This entry was posted in SCSM and tagged , , , , , , . Bookmark the permalink.

17 Responses to Changing the Incident Preview Form

  1. Rob Ford says:

    Excellent article, thanks very much!

  2. bjkoekkoek says:

    We are encountering problems. importing the mpb file works fine but when i click on a incident and the preview pane should show up im getting an error and no preview pane is shown. anyone else also encountering this problem?

    • Marcel Zehner says:


      Strange. I guess you have a problem in the dll or in the MP file ( section). Some more details about the error would be helpful.


  3. bjkoekkoek says:

    Hi Marcel,

    Thanks for your answer here is a document with the error im getting:

    I think the problem is in the dll but i cant figure it out 😦

  4. bjkoekkoek says:

    Thanks very much Marcel. I still don’t know what we did wrong but now it is working! 😀

  5. Markus Klein says:

    Im Screenshot scheint noch ein Fehler zu existieren, in der 6. Zeile der Language Section: Der Display String nicht geschlossen.

  6. snedster says:

    This is a nice solution, works great. Just wondering if you can suggest how this can be applied to change request previews?


    • Marcel Zehner says:


      This should work more or less the same as with incidents. But I never used/tried it myself …


  7. Job van de Velde says:

    Hello Marcel, I want to change the preview of the Change Request. To create the correct Management Pack, how can i find the management packs to depend on??

  8. Søren says:

    How can you add Incident Status and Category to the preview?

  9. Pingback: Issue with preview and customization form in the SCSM – SCSM: all for administration and development

  10. Kayla says:

    Hello, do you happen to still have the solution for this? I have tried to build it for SCSM 2019 and am getting an error in the preview pane that states there is an issue with the Presentation/form section.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s