{"id":1716,"date":"2010-08-17T13:49:21","date_gmt":"2010-08-17T11:49:21","guid":{"rendered":"http:\/\/contoso.se\/blog\/?p=1716"},"modified":"2010-08-17T13:49:21","modified_gmt":"2010-08-17T11:49:21","slug":"add-history-tab-to-your-custom-forms","status":"publish","type":"post","link":"https:\/\/contoso.se\/blog\/?p=1716","title":{"rendered":"Add history tab to your custom forms"},"content":{"rendered":"<p>In <a href=\"http:\/\/contoso.se\/blog\/?p=1707\">this post<\/a> 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.<\/p>\n<p><a href=\"http:\/\/blogs.litware.se\/?p=720\">Patrik<\/a> have created a\u00c2\u00a0form templates for the Authoring Tool that contains already implemented controls like the \u00e2\u20ac\u0153Related Items\u00e2\u20ac\u009d control and &#8220;History&#8221; controls. You can download his template <a href=\"http:\/\/blogs.litware.se\/?p=720\">here<\/a>. In this example I will add the history tab to the form created earlier in <a href=\"http:\/\/contoso.se\/blog\/?p=1707\">this post<\/a>.<\/p>\n<ol>\n<li>Download the package and extract all files<\/li>\n<li>Copy CustomFormTemplates.dll to a suitable folder, in my case C:\\MPs<\/li>\n<li>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<\/li>\n<li>In the Management Pack Explorer, right-click Forms and select Add Custom<\/li>\n<li>In the base class window, select Contoso.Projector as base class, click OK<\/li>\n<li>In the Add custom form window, input\n<ol>\n<li>Internal name: contoso.projector.formB<\/li>\n<li>Assembly: CustomFormTemplates.dll<\/li>\n<li>Type: HistoryOnlyTemplate<\/li>\n<li>Click Create<\/li>\n<\/ol>\n<\/li>\n<li>Add date pickers, labels and text fields as in the earlier post<a href=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/08\/form011.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1719\" title=\"form01\" src=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/08\/form011-300x265.jpg\" alt=\"\" width=\"300\" height=\"265\" srcset=\"https:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/08\/form011-300x265.jpg 300w, https:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/08\/form011.jpg 455w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/li>\n<li>When done, delete your old form, in my case contoso.projector.form<\/li>\n<li>Seal your management pack according to my earlier post<\/li>\n<li>Save your management pack and close the Authoring Tool<\/li>\n<li>Start power shell as administrator, goto your MP folder<\/li>\n<li>Make sure you have the selaed MP (.mp) and the CustomFormTemplates.dll in the same folder<\/li>\n<li>We need to create a MP bundle as we have a custom dll (Patrik form templates) that needs to be inserted into Service Manager.<br \/>\nRun, new-mpbundle.ps1 Contoso.Projector.Library.mp Contoso.Projector.Library (new-mpbundle.ps1 is included in the package from Patrik)<\/li>\n<li>Verify that you now have a new .mpb file in your folder<\/li>\n<li>Import the new MPB file into Service Manager<\/li>\n<li>Change something on a project and then open the CI again and look at the history tab<\/li>\n<\/ol>\n<p><a href=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/08\/form02.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1720\" title=\"form02\" src=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/08\/form02-300x183.jpg\" alt=\"\" width=\"300\" height=\"183\" srcset=\"https:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/08\/form02-300x183.jpg 300w, https:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/08\/form02.jpg 724w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/08\/form03.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1721\" title=\"form03\" src=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/08\/form03-268x300.jpg\" alt=\"\" width=\"268\" height=\"300\" srcset=\"https:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/08\/form03-268x300.jpg 268w, https:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/08\/form03.jpg 563w\" sizes=\"auto, (max-width: 268px) 100vw, 268px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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\u00c2\u00a0form templates for the Authoring Tool that contains already implemented controls like &hellip; <a href=\"https:\/\/contoso.se\/blog\/?p=1716\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[25],"tags":[],"class_list":["post-1716","post","type-post","status-publish","format-standard","hentry","category-system-center-service-desk"],"_links":{"self":[{"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1716","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1716"}],"version-history":[{"count":5,"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1716\/revisions"}],"predecessor-version":[{"id":3018,"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1716\/revisions\/3018"}],"wp:attachment":[{"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1716"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1716"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1716"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}