Here is a simple example that demonstrates how you can add a column to an existing view.
Specifically, we will be adding a “Source” column to the All Open Unassigned Incidents view that is shipped out of the box. “Source” property enables you to see the Incident source (e.g. email, portal, console, SCOM or DCM).
The high level steps are as follows, further details about each step are provided below:
Step 1: Export the Incident Management Configuration management pack
Step 2: Edit the management pack xml and add the column
1. Add the “source” column to Column definitions for the View
2. Add the “source” string to the Viewstrings for the View
3. Add the “source” string to the StringResources Section
4. Add the “source” display strings to the LanguagePacks section for English
Step 3: Save the management pack and Import it in Service Manager
Step 1: Export the management pack that contains the view definition
Note you can only export the unsealed management packs.
In this case the view is defined in Incident Management Configuration pack.
Step 2: Edit the Management Pack to add the “Source” column
Open the saved management pack in your favorite XML editor or Notepad :-)
<Presentations>
<Views>
<View ID="System.WorkItem.Incident.Active.Unassigned.View" Accessibility="Public" Enabled="true" Target="CoreIncident!System.WorkItem.Incident" TypeID="SMConsole!GridViewType" Visible="true">
<Category>NotUsed</Category>
<Presentation>
<Columns>
<mux:ColumnCollection xmlns="
http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:mux=
http://schemas.microsoft.com/SystemCenter/Common/UI/Views/GridView
xmlns:s="clr-namespace:System;assembly=mscorlib">
…….
<mux:Column Name="Source" DisplayMemberBinding="{Binding Path=Source}" Width="150" DisplayName="Header_Source" Property="Source" DataType="s:String" />
</mux:ColumnCollection>
</Columns>
<ViewStrings>
......
<ViewString ID="Header_Source">$MPElement[Name="System.WorkItem.Incident.Active.Unassigned.View.Header_Source"]$</ViewString>
</ViewStrings>
<StringResources>
.......
<StringResource ID="System.WorkItem.Incident.Active.Unassigned.View.Header_Source" />
</StringResources>
<LanguagePacks>
<LanguagePack ID="ENU" IsDefault="true">
<DisplayStrings>
.....
<DisplayString ElementID="System.WorkItem.Incident.Active.Unassigned.View.Header_Source">
<Name>Source</Name>
<Description>Source</Description>
</DisplayString>
</DisplayStrings>
</LanguagePack>
Step 3: Save the management pack and Import it in Service Manager
· Save the management pack – Do not change the name of the MP
· Open the Service Manager Console
· Navigate to Administrations -> Management Packs
· In the Task Pane click Import
· Add the saved management pack and click Import
Navigate to the Work Items -> Incident -> All Open Unassigned Incidents. You should see the “Source” column now displayed in the view.
You can also refer to this post for authoring more complex capabilities through management pack
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.