Cloud and Datacenter Management by Anders Bengtsson

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

« »

© 2019 www.contoso.se. Theme by Anders Norén.