Today I had an interesting Request. A Customer came with the idea of adding an additional field to the Incident Form. It should hold the User that would report the Incident. Often the user reporting the Incident is not the one that has problems (e.g. when a Power User of a Branch Office reports Incidents for all Branch Office Users). If you want to keep information about the Reporting User and the Affected User, this guide shows you how. This is how the Solution would look like:
Update: See my Video about extending Classes and Incident forms here.
I start by creating a new Management Pack in the Authoring Tool. It will be used to store all customizations I will make for the default Incident Management. After the Management Pack is created I open the class “Incident” in the Class Browser. The Incident Management Pack is automatically opened when you show the details of the Incident Class.
Now I have to extend the default Class “Incident”.
Because the Incident Class is stored in a sealed Management Pack, I have to define in which unsealed Management Pack the extension will be saved and how the Extension Class will be called.
Now I am ready to add the needed relationship to the User Class. I have to define a unique ID for the new relation. I call it “ReportingUser”.
After the relation is created, the details can be configured as needed. It’s important to change the Target Class of the relationship to the Object Type you want to use in the relationship. In this example I want to add an Object from the User Class. Therefore I select “User” (default is “Object”).
Now we are ready to extend the default Incident Form. I choose it from the Form Browser and select “View”. After that, I select “Customize” to extend the Form. Again, I have to select an unsealed Management Pack to store the Customization.
The Form Customization Toolbox should open automatically. Because I have to place another User Picker on the form, I need some more space on it. One way to do it is to just move down one of the existing Objects on the form. I choose “Title” and configure a Top Margin of 60. This creates the needed space and moves all objects down.
Now I drag a Label and a User Picker Object to the empty space and configure them using the Details Settings. One important setting is to bind the User Picker to the relationship we configured in the first step. Otherwise the selected User cannot be stored in the Incident Form.
Now it’s time to import the Management Pack and test if the customization is working as expected. When I create a new Incident, I have the new field and can populate it with Objects of the User Class.
Update: See my Video about extending Classes and Incident forms here.
Regards
Marcel
Pingback: System Center Service Manager information(blog) overview - System Center Service Manager
HI there
How do I link this file to the portal?
Regards
Umang
Hey
Can you please clarify?
regards
Marcel
Basically, what I was thinking was if this is possible in the console, will it be possible to add these options to the portal as well. so the enduser can log a call on behalf of someone else.
Hey Umang
This needs some modification of the portal. I have not tried it yet, but take a look at the Portal Source Code –> http://www.microsoft.com/downloads/en/details.aspx?FamilyID=65fbe0a3-1928-469f-b941-146d27aa6bac. This should be a good starting point.
regards
Marcel
What if you wanted straight text in the additional field rather than a user. What would you use for your target class?
Hey
Not exactly sure what you mean, but you can extend the incident with any property you want and bind this to a label or textbox control on the Incident form. The procedure would be almost the same …
regards
Marcel
Pingback: Remove the extensions tab on the Incident form | SCSMfaq.ch
How would you make the field a required field and prevent the incident from being created if it was missing?
Hey
You can indeed mark an additional incident property as required. the problem is that when you import the MP it will fail because the existing incidents dont have a value for that field. as a workaround you can set a default value for the required property, then it works. problem then is that even when creating new objects, they have this default value already set. If you create a new class you can mark properties as mandatory without setting a default value.
regards
Marcel
Is it possible to make a custom form field required?
Thanks in advance
Hey
Yes and No. You can indeed mark an additional incident property as required. the problem is that when you import the MP it will fail because the existing incidents dont have a value for that field. as a workaround you can set a default value for the required property, then it works. problem then is that even when creating new objects, they have this default value already set. If you create a new class you can mark properties as mandatory without setting a default value.
regards
Marcel
Is this field added to the dababase ? ( and what table ) and if is not added how i can add this field thanks !
Hey
Sorry for the delayed response – i was on holidays 🙂
You should see a new table in the ServiceManager database called something like “dbo.MT_xxx” where xxx is the ID of the class extension.
regards
Marcel
Hi, i’m trying to make a custom form field “required” but can’t seem to manage it.
i’ve followed the example in this post to add the custom field to the form, but i can’t see an obvious way to make it required.
i’ve marked the relationship properties as required, but that doesn’t seem to affect the incident form.
when i add a new item to the custom object the fields are marked as required there, but not on the incident or change request forms.
any idea how i can acheive this?
many thanks
Hey
There’s no OOB way to mark those attributes as required. When you re-build the form from scratch or implement a hidden user control that does the check (both in Visual Studio) this would work.
regards
Marcel
Hi Marcel,
thanks for the reply, i will look at the hidden user control.
although it might be as well for us to build a new form, as we have done some customisation.
thanks for the help.
Simon
how this additional field can be use for reporting? Please reply urgent
Hey
Sorry for the delay. Did you seal the MP?
regards
Marcel
No, i didnt seal the MP. is it work if i seal it?
Hey
Yes, you must seal it. Otherwise only enumerations are synched to the DW.
regards
Marcel
Hi Marcel, When i seal my MP and if i want to make another customization how can i unseal or i have to create new one ?
Hey
You should always Keep an unsealed Version of your MP. This can be used if you later want to make any modifications to the MP.
regards
Marcel
Hi
I followed your instructions on creating the relationship of the reporting user. How do I view reports on this in the data warehouse?
Thanks
Nat
Hey
This needs some additional steps because you have to modify the Report Definitions. Myself, I dont have a walkthrough for this, but I’m sure you will find some out there …
regards
Marcel
Hi Marcel, If I make modifications to a previously modified MP (there was an unsealed version kept for this purpose) and then import and seal the new revised incident form with additional fields, will this change dates on the incidents created with the older version of the form? I am adding scheduled start and end date, but read somewhere that modifying the form can affect the created and other dates.
Regards,
Trina
Hey
Sorry for the delay, I was on holidays. This should only update the last modified date …
regards
Marcel
Can I create a custom “read-only” field with assigned a preset value to the custom “read-only” field ? If so, how to do this ?
Hey
Depending on the exact needs you can use a label that is bound to a property … this can be done using the Authoring Tool. Just drag a label element to the Incident form and bind it to whatever property you want to display.
regards
Marcel
I know I need to use Authoring Tool to drag the field, but I don’t want to bind the custom field to a property, I only want to assign a string or numeric value (e.g. MyCustomeValue) to the custom field and then marked the custom field as “read only” such that nobody can change it. I plan to use Orchestrator to read the value in the custom field to perform something else.
There seems no way to mark the custom field as read only and to assign a string or numeric value using the Authoring Tool.
Hey
Where does the information live that you want to display?
regards
Marcel
I want to create a view for “Review Activity” and “Manual Activity” and restrict the view to be seen by a particular group of persons. However, “Review Activity” and “Manual Activity” do not have a “Support Group” field similar to Incident Ticket, so I want to create a custom field and assigned a string value (e.g. “MyCustomValue”), then I can setup a filtering criteria in the view of “custom field equals to MyCustomValue”.
To avoid the person who view the “Review Activity” or “Manual Activity” to modify the custom field, I want to make it as read-only
Hey
Add a new property to the Activity Classes, then fill in a value based on your process. You dont have to display this on the form for doing the filtering because the users that work with the activity will not use it. Correct? Or add a label and bind it to the property.
regards
Marcel
Hello,
I extended incident class, created a relationship for Reporting User and also added Reporting User on the incident form. Then I created a request offering where user can create an incident on behalf of another user. My question is this. Is it possible to somehow map this selected user to “Reporting User” in the incident form. Problem is that prompts output from the portal can only be mapped to a property and not to a relationship. Is there any other way to get this selected user to “Reporting User” relationship?
Regards
Hey
Please take a look at this post –> http://blogs.litware.se/?p=1300. That should help.
regards
Marcel
Hi Marcel.
In the create incident form i want to hide an out of the box ‘incident classification’ dropdown that is required as default. I can change it to be hidden or greyed out but not change it to required=false. Is this expected behaviour? how can i remove this field as required so i can then remove it from the form?
Hey
To get this done you need a custom control. Check Anton’s post for details –> http://blog.scsmsolutions.com/2011/08/create-custom-user-control-for-scsm-2010/.
Cheers
Marcel
May I know why would you want to remove the incident classification dropdown list box ?
Hi Marcel
when i create a custom field, the table in the DB save the register as a catalog or save the register as a trasactional register and start to growing?
Hi Marcel.
Let say that I would like the Reporting User to be notificated aswell by mail with any update of the Work Item (via workflow).
Since in the notificacion default I can only assign Creator User, Affected, Assigned, Closer… would It be any way to add this Custom fields as ones to be notificated aswell?
Regards.
Carlos
I was too eager in putting this post.
After importing the MP, It let me in the workflows select “Report User” as to be notified.
I checked that this “customization” only works from console, If I try to use it as a template for portal request, since the customization for the portal creates an unsealed MP, and the Incicent customization is unsealed too, they cannot be referenced.
If I seal the Incident customization MP I guess that problem would be solved, still I don’t know how to map a prompt into the reporting user, I can put the field, make it search to users in the CMDB, but it won’t allow me to map that result to the Report User field.
Hey
Check out Patricks post here, that should help –> http://blogs.litware.se/?p=1300
Cheers
Marcel
Forgive me if this has been answered, but can you create custom fields that are also logically related to other fields? For ex., we are currently using the Category field, but we have many to level categories, sub-categories, and further down, all which are selected in this singular field…so it can sometimes be complicated and makes reporting a little cumbersome.
To help alleviate mistakes and reporting on this, it would be helpful to have a single ‘Category’ field, and then many a Subcategory (or 2) field with only data applicable to the category. (So maybe if the Category was ‘Networking’, the subcategories would only have defined fields for Networking, and so on.
For ex, if instead of in the Category field have essentially
Helpdesk\Troubleshooting\Break-Fix
Have:
Category: Helpdesk
SubCategory: Troubleshooting
2nd Ties Sub: Break-Fix
Also if this would be able to be reported on via the odc file that would be great.
I know other service-desk softwares have this capability, but not sure about SCSM yet (still new to it).
Thanks!
A
Hey
This is not possible with basic customizations. However, if you are willing to develop some more complex things in Visual Studio, this is indeed possible.
Cheers
Marcel
Hi Marcel,
I follow your post and it is very helpfull…
I have another question related this post.
In my incident form, I have the affected user and I need display in a field the location of this userthat is recovered by a field called office in my AD User form.
How can I do it and li nk my field to my affected user ?
Regards
Philippe
Madininarawak
Hey
If the information that you want to display is available on the User CI in the CMDB, just add a label control to the incident form and bind it to that property.
Cheers
Marcel
Excellent blog, a must for beginning to learn about the Authoring Tool. For some helpful ways to add new Labels and Controls exactly where you want it, go to http://www.cireson.com/scsm/adding-a-field-to-the-right-of-an-existing-field-scsm-2012-authoring-tool/
I am trying to get an AD Attrubute on the Incident form for our users phone extension in AD. It is a field called IPPhone. Is there a way to add this to our incident form?
Hey
Sure, just add a label to the form using the Authoring Tool. Then bind the label to the IPPhone attribute.
Cheers
Marcel
Hi Marcel,
Thanks very much for the blog and for the videos. They are really helpful.
I have a need for two Incident screens, with different fields on each. For example, one Incident type only needs to capture 10 pieces of data, whereass another needs 15.
Do you know if there is a way to have two incident screens, configured for each type as opposed to extended the default class and screen to include the combined list of fields.
cheers,
Anthony.
Hey
1 Class (Incident) can only have 1 form assigned to it. The only thing that would work is create a new Incident class that derives from the default Incident class and then create a custom form for that new class. The downside then is that you have 2 different Incident classes.
Cheers
Marcel
Hi,
Is it possible to add a field where i can upload picture and display it as a thumbnail pic. I need it for Configuration Items for asset management.
Thanks in advance.
I have added a custom field and put it in the Incident Form for testing purpose, the custom field was saved to a custom management pack and it was sealed. Now I found that I don’t need it and want to remove it. However, when I remove the MP, I got the following error:
=====
There are other management packs that depend on the management pack you are trying to delete. To view the dependent management packs, open the properties for this management pack. Delete all dependent management packs before trying to delete this management pack again.
=====
After checking, I found a lot of currently used management packs were in the dependent list. What should I do ?
Hey
It seems that you have references in other MPs. That could be a template that uses the class defined in your MP. If so, all those objects must be deleted. Then remove the references to the MP that you want to delete. For that you can export the MP and remove the reference using a XML editor. Then reimport the MP.
Cheers
Marcel
Hi Marcel,
The company is installed Service Manager 2012 SP1, in the form of incidents created a list type field, which is visible to the record of the incident, even in the database not created this field cubes and what is not .
My question is: Where to store the fields that are created with authoring tools in the database the Service Manager and who are can be accessed on the cubes.
Hey
Did you create an Outrigger for the list?
Cheers
Marcel
no, marcel, which I think was just the list type field as shown in the images, in ste times already found the field created in the transactional database service manager, per not find the relationship between the incident id and field recorded in the database datamart. Example:
Field: Incident_agencia: New york (Origin of the incident)
Field: Id incident: IN-3020
Relationship:
IN -3020 – New york
thank you very much
Not created an Outrigger for the list, it is new, what was done was make the step described in his blog.
I suggest if you can create a new field in this field formualrio and place it in the datamart database and make a report sent to excel cube.
Thank you very much.
Marcel – I’m new to this. I created a new class, fields and a new form as per your intructions. I made the fields required. I bundled the management pack and imported it. When I attempt to create a template with the new class I created the console crahes when loading the form. Here is the error I get: An error was encountered while running the Service Manager Console. The console will now close.
Here is the error log:
System.ArgumentException: source
at Microsoft.EnterpriseManagement.UI.SdkDataAccess.DataAdapters.EnterpriseManagementObjectProjectionDataType.AddTypeProjectionInTypeProjectionDefinition(IDataItem source, IDataItem typeProjection, Boolean overwrite)
at Microsoft.EnterpriseManagement.GenericForm.FormUtilities.FetchAndMergeSubProjectionAsync(IList`1 emoProjections, Guid subProjectionId, AsyncCallback postCallback, Boolean mergerSubTypeProjection, Boolean overwriteComponents, Boolean fetchSubProjection)
at Microsoft.EnterpriseManagement.GenericForm.FormUtilities.FetchAndMergeSubProjectionAsync(IList`1 emoProjections, Guid subProjectionId, AsyncCallback postCallback, Boolean mergerSubTypeProjection, Boolean overwriteComponents)
at Microsoft.EnterpriseManagement.GenericForm.FormUtilities.FetchAndMergeSubProjectionAsync(IList`1 emoProjections, Guid subProjectionId, AsyncCallback postCallback, Boolean mergerSubTypeProjection)
at Microsoft.EnterpriseManagement.GenericForm.FormUtilities.FetchAndMergeSubProjectionAsync(IList`1 emoProjections, Guid subProjectionId, AsyncCallback postCallback)
at Microsoft.EnterpriseManagement.GenericForm.FormUtilities.FetchAndMergeSubProjectionAsync(IDataItem emoProjection, Guid subProjectionId, AsyncCallback postCallback)
at Microsoft.EnterpriseManagement.ServiceManager.ChangeManagement.Forms.ChangeRequestForm.ChangeRequestDataContextChanged(Object sender, DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyPropertyChangedEventHandler.Invoke(Object sender, DependencyPropertyChangedEventArgs e)
at System.Windows.FrameworkElement.RaiseDependencyPropertyChanged(EventPrivateKey key, DependencyPropertyChangedEventArgs args)
at System.Windows.FrameworkElement.OnDataContextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
at System.Windows.FrameworkElement.set_DataContext(Object value)
at Microsoft.EnterpriseManagement.UI.FormsInfra.FormViewController.b__16()
at Microsoft.EnterpriseManagement.UI.FormsInfra.FormViewController.OnReadHelperPropertyChanged(Object sender, PropertyChangedEventArgs e)
at Microsoft.EnterpriseManagement.UI.ViewFramework.SupportClassBase.OnPropertyChanged(Object sender, PropertyChangedEventArgs e)
at Microsoft.EnterpriseManagement.UI.ViewFramework.SingleItemSupportClass.NewDataAvailable(Object sender, DataEventArgs e)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.TranslateAndDispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Window.ShowHelper(Object booleanBox)
at System.Windows.Window.Show()
at System.Windows.Window.ShowDialog()
at Microsoft.EnterpriseManagement.ConsoleFramework.WindowManager.GenericWpfWindowConstructor.BeginShow(ShowViewContext showViewContext, Object parent, Object view, AsyncCallback callback, Object state)
at Microsoft.EnterpriseManagement.ConsoleFramework.ViewConstructor.BeginShow(ShowViewContext showViewContext, AsyncCallback callback, Object state)
at Microsoft.EnterpriseManagement.ConsoleFramework.WindowManager.WpfWindowRecord.ShowWindow()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Any help appreciated on this. Thanks
Julio B
Hey
Everything else (create object instances, relationships etc.) works fine?
Cheers
Marcel
Hi Marcel,
i added a field the same way you did.
But now I want to generate a report on the basis of this field.
What do I have to do now? Where can I find the field, cause it is not stored in the IncidentDim.
Thanks you for helping!
Fabian
Hi Marcel,
I am using SCSM 2012 SP1 Cu4. I have extended the Incident class and form. I added new tabs on the Incident form using Tab Item in the Authoring Tool . When I import the MP.xml, the new tabs are not displayed. Only the extension tab with custom properties.
What am I missing?
Hey
Hmm, did you restart the console after importing the MP?
Cheers
Hello Marcel, I have extended the Incident class to add a new enum property for my incident form. I also need it for my custom report. But in the database I cannot find my extended class, that is why I cannot run any query base on this property. Did I forget something? I would be happy if you can give me a hint.
Hey
– Is the MP where the list is stored sealed?
– Is the MP successfully synced to the DWH?
– Did you create an outrigger?
Cheers
Marcel
No, the MP is not sealed and is not showing in the DWH. How can I replace my unsealed MP with the sealed MP without losing data? Do I need to create an outrigger? How can I do that?
you need to create a new sealed version of the mp. before the import you must remove the unsealed mp version. this means that the field with all the values for all incidents will be gone …
So I think before I seal the MP I have to create an outrigger. How can I create this?
I would place the outrigger config in a separate MP. Check this article for details about the outrigger –> http://technet.microsoft.com/en-us/library/hh916535.aspx
Cheers
Marcel
Should I place the enum property in a separate MP too? So I just need to seal it and I won’t lose all my config because I don’t have to replace my existing MP.
Enum (Root) should be placed in a sealed MP. The values of the list however should stay in an unsealed MP, so that they can be modified (if needed) from the Console.
Hi Marcel,
great blog.
I have extended the Service Request class with some properties and a list. I am trying to query the Service Manager database to find the list item that is associated with a particular service request.
In the dbo.MT_ClassExtension_xxx table I can see all the fields.
The simple data types have values in there that I can query directly, but the list type only has a GUID. Where is the linked table that actually holds the related list data?
Thanks,
Simon.
Hey Simon
List values are always displayed as a GUID. Why? Because the database has a value for the same GUID in different languages. If you want to display the correct string in your prefered language you need to join the DisplayStrings View/Table and filter based on your language code. To make sure you have this translation available you might also need to create an outrigger to bring your list details over to the DWH.
Hope this works for you!
Cheers, Marcel
OK great thanks
Hello,
Thanks for the procedure. I went thru the steps an added “Department” as custom field. Now how can I connect this field to Active Directory, like the users’ field.
Regards,
Hussam
Hey
You could for instance show the department field of the affected user on the IR form. For this just add a Label (or TextBox) and configure the proper binding to the AD User property “department”.
Cheers
Marcel
Thank you for this blog. I am new here and I have a same request for service requests. I was following your example but just on service requests. When i got to binding I noticed that “requested by user” (or something like that)is already there out of the box. Just wondering if I can use that. Also if I seald MP and import it how can I update it later?If I keep unseld MP can I update it , seald it again and import it again with the same name. I also have one seald MP and I did not save unseald MP before i seald and imported to SCSM. Would I be able to export seald MP , update it with authoring tools , seal again and import it back?
Hey
If you seal your MP and Import it, you can always update the unsealed Version of the MP with your authoring Tools. After the modification, seal it again and Import it “over” the already existing MP. That works find as Long as you do not remove entity type Information from the MP. If you only have the imported, sealed MP, Export it from the console and you will get an unsealed Version of it.
Cheers
Marcel
Hi marcel,
I tried to apply this procedure (creating a new Relationship, adding a user picker & binding it to my relationship then sealed the mp).
However in the console when I add a user using this picker I can save my IR but, if I open it back the field is empty. In the history tab there is no mention of adding a new relation.
Have you seen this behvior ?
Hi thanks for the blog.
I would just like to add one single custom field to my “New Incident” form called “Effected User’s Email Address”. This will be a free text input field so I am not sure how to go about relating this new field to a class, any help would be appreciated.
Sorry Just to add to my previous, I will be importing new incident data via a CSV import so I will need to know how to address the new “Effected User’s Email Address” field by naming a class as below.
Hey
You need to add a text-based property to the incident class (e.g. “manual mail address”), then add a text-control to the form that is bound to this new property.
Cheers
Marcel