{"id":998,"date":"2010-06-14T13:29:21","date_gmt":"2010-06-14T18:29:21","guid":{"rendered":"http:\/\/blogs.devhorizon.com\/reza\/?p=998"},"modified":"2010-06-14T13:50:03","modified_gmt":"2010-06-14T18:50:03","slug":"sharepoint-2010-creating-custom-list-definitions-that-use-infopath-forms","status":"publish","type":"post","link":"https:\/\/blogs.devhorizon.com\/reza\/2010\/06\/14\/sharepoint-2010-creating-custom-list-definitions-that-use-infopath-forms\/","title":{"rendered":"SharePoint 2010: Creating Custom List Definitions that Use InfoPath Forms"},"content":{"rendered":"<p>The general requirement is a &#8220;round-trip&#8221; of the form you want to add or replace. Before adding or replacing forms in a WSP, they need to be published. Once the form is in a WSP, it can be imported into any Visual Studio project (i.e. a project that defines a custom List definition) and reused. When you publish the form, URLs in the XSF file can be relativized, and other content can be added\/removed from XSN components as required by the publish process. We&#8217;re proposing the following, for example, when replacing a WSP form:<\/p>\n<p>1. Open the WSP in Visual Studio<br \/>\n2. Locate the XSN in the WSP (there is a standard structure for both list and form library forms).<br \/>\n3. Download a copy of the XSN from SharePoint server using SPD, or make a copy of the XSN that is currently in the WSP.<br \/>\n4. Make the required modifications to the XSN in the InfoPath Designer application<br \/>\n5. Publish the form back to SharePoint<br \/>\n6. Download the XSN from SharePoint using SPD.<br \/>\n7. Replace the XSN in the WSP<br \/>\n8. Repackage\/deploy the WSP<\/p>\n<p>That&#8217;s the general &#8220;life-cycle&#8221; and practice. The process below is touching on deploying a SharePoint list form:<\/p>\n<p>If you&#8217;ve already upsized a list, before importing the Site WSP into Visual Studio, the XSN will exist in the WSP and can be modified. There is also a process for adding a form to a list definition in a WSP which involves several manual steps. At a high level, the latter involves:<\/p>\n<p>1. Add the XmlDocument to the Schema.xml (under List instances)<br \/>\n2. Under the Modules node, add a new Module (Item_):<\/p>\n<ul>\n<li> Name: Lists&lt;name&gt;Item_<\/li>\n<li>Modify the Elements.xml file.<\/li>\n<li>Remove the &#8220;Sample.txt&#8221; file added by VS.<\/li>\n<li>Add Folders under the created module and add the XSN template so that the path matches the one described in the Elements.xml file<\/li>\n<\/ul>\n<p>3. Add the Item_pages Module:<\/p>\n<ul>\n<li> Name: Lists&lt;name&gt;Item_pages<\/li>\n<li>Get the List ID (On the SharePoint server, the link to Add a new list item contains the List ID, it can be copied from there.) &lt;- this step might not be necessary, the deployment process\u00a0 doesn&#8217;t match the list by ID but by name, any GUID would do as long as it&#8217;s unique.<\/li>\n<li>Ensure the sharePointListID attribute (under the sharepointListAdapterRW node) on the manifest.xsf file matches the GUID &#8220;id&#8221; value for the Elements.xml file created in this step.<\/li>\n<li>Add the property bag to the _pages node.<\/li>\n<li>Requires: vti_eTag: maps to the uniqueID for the folder &#8220;Lists\\&lt;name&gt;\\item&#8221;.\u00a0 &#8211;&gt; More specifically: PropertyBag refers to the properties of the &#8220;item&#8221; folder.<\/li>\n<\/ul>\n<p>4. Add a property bag per item to the modules, one for each:<\/p>\n<ul>\n<li> Template.xsn<\/li>\n<li>Displayifs.aspx<\/li>\n<li>EditIfs.aspx<\/li>\n<li>NewIfs.aspx<\/li>\n<\/ul>\n<p>On the &#8220;Features&#8221; node add the Modules created before (step 2 &amp; 3: Lists&lt;name&gt;Item_\u00a0\u00a0 &amp; Lists&lt;name&gt;Item_pages)<\/p>\n<p>That&#8217;s it!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The general requirement is a &#8220;round-trip&#8221; of the form you want to add or replace. Before adding or replacing forms in a WSP, they need to be published. Once the form is in a WSP, it can be imported into any Visual Studio project (i.e. a project that defines a custom List definition) and reused. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-998","post","type-post","status-publish","format-standard","hentry","category-sharepoint-2010"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>SharePoint 2010: Creating Custom List Definitions that Use InfoPath Forms - Reza Alirezaei&#039;s Blog %<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blogs.devhorizon.com\/reza\/2010\/06\/14\/sharepoint-2010-creating-custom-list-definitions-that-use-infopath-forms\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Reza Alirezaei\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/2010\\\/06\\\/14\\\/sharepoint-2010-creating-custom-list-definitions-that-use-infopath-forms\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/2010\\\/06\\\/14\\\/sharepoint-2010-creating-custom-list-definitions-that-use-infopath-forms\\\/\"},\"author\":{\"name\":\"Reza Alirezaei\",\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/#\\\/schema\\\/person\\\/cdbb24d283697a65951cb4a14e474938\"},\"headline\":\"SharePoint 2010: Creating Custom List Definitions that Use InfoPath Forms\",\"datePublished\":\"2010-06-14T18:29:21+00:00\",\"dateModified\":\"2010-06-14T18:50:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/2010\\\/06\\\/14\\\/sharepoint-2010-creating-custom-list-definitions-that-use-infopath-forms\\\/\"},\"wordCount\":501,\"commentCount\":14,\"articleSection\":[\"SharePoint 2010\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/2010\\\/06\\\/14\\\/sharepoint-2010-creating-custom-list-definitions-that-use-infopath-forms\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/2010\\\/06\\\/14\\\/sharepoint-2010-creating-custom-list-definitions-that-use-infopath-forms\\\/\",\"url\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/2010\\\/06\\\/14\\\/sharepoint-2010-creating-custom-list-definitions-that-use-infopath-forms\\\/\",\"name\":\"SharePoint 2010: Creating Custom List Definitions that Use InfoPath Forms - Reza Alirezaei's Blog %\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/#website\"},\"datePublished\":\"2010-06-14T18:29:21+00:00\",\"dateModified\":\"2010-06-14T18:50:03+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/#\\\/schema\\\/person\\\/cdbb24d283697a65951cb4a14e474938\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/2010\\\/06\\\/14\\\/sharepoint-2010-creating-custom-list-definitions-that-use-infopath-forms\\\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/#website\",\"url\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/\",\"name\":\"Reza Alirezaei's Blog\",\"description\":\"Blogging from the field!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/#\\\/schema\\\/person\\\/cdbb24d283697a65951cb4a14e474938\",\"name\":\"Reza Alirezaei\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3ba940d84e0ecb909e62e93df4c56daf0395c7e53c914467ab2ee73124a7d7b6?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3ba940d84e0ecb909e62e93df4c56daf0395c7e53c914467ab2ee73124a7d7b6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3ba940d84e0ecb909e62e93df4c56daf0395c7e53c914467ab2ee73124a7d7b6?s=96&d=mm&r=g\",\"caption\":\"Reza Alirezaei\"},\"url\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/author\\\/rezaa\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SharePoint 2010: Creating Custom List Definitions that Use InfoPath Forms - Reza Alirezaei's Blog %","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blogs.devhorizon.com\/reza\/2010\/06\/14\/sharepoint-2010-creating-custom-list-definitions-that-use-infopath-forms\/","twitter_misc":{"Written by":"Reza Alirezaei","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blogs.devhorizon.com\/reza\/2010\/06\/14\/sharepoint-2010-creating-custom-list-definitions-that-use-infopath-forms\/#article","isPartOf":{"@id":"https:\/\/blogs.devhorizon.com\/reza\/2010\/06\/14\/sharepoint-2010-creating-custom-list-definitions-that-use-infopath-forms\/"},"author":{"name":"Reza Alirezaei","@id":"https:\/\/blogs.devhorizon.com\/reza\/#\/schema\/person\/cdbb24d283697a65951cb4a14e474938"},"headline":"SharePoint 2010: Creating Custom List Definitions that Use InfoPath Forms","datePublished":"2010-06-14T18:29:21+00:00","dateModified":"2010-06-14T18:50:03+00:00","mainEntityOfPage":{"@id":"https:\/\/blogs.devhorizon.com\/reza\/2010\/06\/14\/sharepoint-2010-creating-custom-list-definitions-that-use-infopath-forms\/"},"wordCount":501,"commentCount":14,"articleSection":["SharePoint 2010"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blogs.devhorizon.com\/reza\/2010\/06\/14\/sharepoint-2010-creating-custom-list-definitions-that-use-infopath-forms\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blogs.devhorizon.com\/reza\/2010\/06\/14\/sharepoint-2010-creating-custom-list-definitions-that-use-infopath-forms\/","url":"https:\/\/blogs.devhorizon.com\/reza\/2010\/06\/14\/sharepoint-2010-creating-custom-list-definitions-that-use-infopath-forms\/","name":"SharePoint 2010: Creating Custom List Definitions that Use InfoPath Forms - Reza Alirezaei's Blog %","isPartOf":{"@id":"https:\/\/blogs.devhorizon.com\/reza\/#website"},"datePublished":"2010-06-14T18:29:21+00:00","dateModified":"2010-06-14T18:50:03+00:00","author":{"@id":"https:\/\/blogs.devhorizon.com\/reza\/#\/schema\/person\/cdbb24d283697a65951cb4a14e474938"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blogs.devhorizon.com\/reza\/2010\/06\/14\/sharepoint-2010-creating-custom-list-definitions-that-use-infopath-forms\/"]}]},{"@type":"WebSite","@id":"https:\/\/blogs.devhorizon.com\/reza\/#website","url":"https:\/\/blogs.devhorizon.com\/reza\/","name":"Reza Alirezaei's Blog","description":"Blogging from the field!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blogs.devhorizon.com\/reza\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blogs.devhorizon.com\/reza\/#\/schema\/person\/cdbb24d283697a65951cb4a14e474938","name":"Reza Alirezaei","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3ba940d84e0ecb909e62e93df4c56daf0395c7e53c914467ab2ee73124a7d7b6?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/3ba940d84e0ecb909e62e93df4c56daf0395c7e53c914467ab2ee73124a7d7b6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3ba940d84e0ecb909e62e93df4c56daf0395c7e53c914467ab2ee73124a7d7b6?s=96&d=mm&r=g","caption":"Reza Alirezaei"},"url":"https:\/\/blogs.devhorizon.com\/reza\/author\/rezaa\/"}]}},"_links":{"self":[{"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/posts\/998","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/comments?post=998"}],"version-history":[{"count":0,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/posts\/998\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/media?parent=998"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/categories?post=998"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/tags?post=998"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}