Home » System Center Service Manager » Add history tab to your custom forms

Add history tab to your custom forms

In this post I showed you how to create a custom CI class, a form and seal the management pack. If you want to continue working with your form and add the history tab you can follow this blog post.

Patrik have created a form templates for the Authoring Tool that contains already implemented controls like the “Related Items” control and “History” controls. You can download his template here. In this example I will add the history tab to the form created earlier in this post.

  1. Download the package and extract all files
  2. Copy CustomFormTemplates.dll to a suitable folder, in my case C:\MPs
  3. Open the Authoring tool and your MP where you want to create a form . In my case I will use the MP and form created in the earlier post. I will replace the form with a new form
  4. In the Management Pack Explorer, right-click Forms and select Add Custom
  5. In the base class window, select Contoso.Projector as base class, click OK
  6. In the Add custom form window, input
    1. Internal name: contoso.projector.formB
    2. Assembly: CustomFormTemplates.dll
    3. Type: HistoryOnlyTemplate
    4. Click Create
  7. Add date pickers, labels and text fields as in the earlier post
  8. When done, delete your old form, in my case contoso.projector.form
  9. Seal your management pack according to my earlier post
  10. Save your management pack and close the Authoring Tool
  11. Start power shell as administrator, goto your MP folder
  12. Make sure you have the selaed MP (.mp) and the CustomFormTemplates.dll in the same folder
  13. We need to create a MP bundle as we have a custom dll (Patrik form templates) that needs to be inserted into Service Manager.
    Run, new-mpbundle.ps1 Contoso.Projector.Library.mp Contoso.Projector.Library (new-mpbundle.ps1 is included in the package from Patrik)
  14. Verify that you now have a new .mpb file in your folder
  15. Import the new MPB file into Service Manager
  16. Change something on a project and then open the CI again and look at the history tab


7 Comments

  1. Hi,
    Are there any updates available for SCSM 2016.
    The customforms.dll doesn’t work anymore since SCSM 2016 is now based on .Net4..

    thanks!

  2. Thanks for reading my blog, yes I think it will work there too. But in work items you often already have a history, just not named history, but the same kind of information.

  3. There’s probably a bug inside the assembly, that causes the console to crash.
    If you choose to build a CITemplate form and you define a relationship through a user picker control that targets – for example – User class, when you open the form (to edit an existing item or create a new one) the console crashes.
    This doesn’t happen if you build a form by using a HistoryOnlyTemplate

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.