Re-using Related Items and History controls in Custom forms


The question is out there – “How can we add Related Items and History controls to our custom forms as seen in the built in forms”. Now, if you’re a fully grown developer you might have been able to figure this out when building forms for Service Manager in Visual Studio. But wouldn’t it be nice to be able to do this in the Authoring Tool. Since you’re able to add custom forms in the Authoring Tool and then further customize these I came to think about creating form templates for the Authoring Tool that contains already implemented controls like the “Related Items” control. To aid those who ask I’ve created some example templates that make use of the “Related items” and “History” controls (you can download the templates, source code and documentation from here).

To try the templates out in the console you can import the Custom.Form.Examples.mpb and go to Configuration Items – Computers (Deployed) – All Computers (Deployed) and open one of the listed CIs.

To learn how to use the templates, please try the example described in the document called “Building a new form using custom template” provided in the download.



  1. Aengus says:

    Great stuff!
    Thank you Patrik!!

  2. [...] 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. [...]

  3. Great work! I have a example how to use this solution at

  4. [...] Re-using Related Items and History controls in Custom forms (New) [...]

  5. Alberto says:

    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

  6. BrettHam says:

    This is really great stuff. However I have implemented a custom CI type with this form and although the history tab is working fine the Related Items tab seems to be read only. Any ideas why this would be happening?

  7. [...] Re-using Related Items and History controls in Custom forms  [...]

  8. [...] Re-using Related Items and History controls in Custom forms  [...]

  9. EdShep says:

    I am having the same issue as BrettHam…

    I have tried to modify the code supplied to apply it to one of my bespoke CI classes, but could not get the tab to ‘work’

    are their any solutions out there?


  10. Patrik Sundqvist says:

    Hi Ed,
    Are you using Service Manager 2010 or 2012?

  11. Paulo Xaxá says:

    I am having the same issue as BrettHam and EdShep!!

    My system: Service Manager 2010 SP1 with the CU2 and CU3 instaled.

    Are the solution?



  12. Paulo Xaxá says:

    We can also add the controls “Components” and “Dependent”, as in Bussiness Services?

  13. John Clark says:

    Does this work only with Configuration Items or custom Work Items as well?

  14. Patrik Sundqvist says:

    I’ll be writing a “2012″ version of this post as soon as possible. I’ll try to answer all your pending questions in that post. Keep your eyes open :)

  15. Tim Gabrhel says:

    Hi Patrik,

    Any chance you can provide some insight to getting it to work in 2012 with custom Config Item classes? I’m having the same issue as the others…The ‘Add’ button stays disabled when using custom relationships. I can get it to work using an OOB ‘Relates to Work Item’ relationship.

    Even a sentence or two of direction if it is simple enough.

  16. Patrik Sundqvist says:

    Hi Tim,

    This is very high on my list of things to do. Expect a reply within the next few days.

  17. Hi !
    Any updates her ? would be interested in an 2012 Version.

  18. Patrik Sundqvist says:

    Yes, believe it or not :) but I’m actually working on the updated. Since I don’t want to promise to much, let’s say I try to get it done this week.

  19. Patrik Sundqvist says:

    For those of you that’s waiting I’ve finished the update of the source code and created two new templates that works fine in SCSM 2012. One template for Work Items and one for Configuration Items. The blog post will be up tomorrow!

  20. Patrik Sundqvist says:

    I’ve made a solution for SCSM 2012. Go try it out!
    “Part 1: Custom Form Templates for Service Manager 2012″

  21. Ed Shep says:

    Hi Patrick, (appologies… I have also posted this on technet which you may have had an alert for…)
    I have been back at this one to try and sort another issue we have been having and am glad to report that with a combination of a little more experiance on XML, type projections, SCSM2010, a tad more wisdom with an extra bit of age, I have managed to get it working! The related items tab buttons and relationships all work a treat. It turns out your instructions were pretty much spot on and it was simply my ignorance of all the above that caused the problem.

    My only problem with this now however is that the tab entries of “general”, “Related Items” and “History” are no longer visible in there places are three tiny boxes.

    do you know what I have missed? Just as extra background, the custom CI class has been sealed and the form is in its own mpb.

    As ever, any help is greatfully recieved. Thanks in Advance,


  22. Sundaresan says:

    I tried this with CI template. But when open the SCSM console and when try to create an CI item under this form, the console crashes. What will be the issue? Is there any change to be done in the Assembly?

Leave a Reply