{"id":18884,"date":"2019-06-06T12:36:35","date_gmt":"2019-06-06T12:36:35","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=18884"},"modified":"2021-12-15T16:12:48","modified_gmt":"2021-12-15T10:42:48","slug":"add-fields-in-xml-mapping-of-existing-word-template-used-in-dynamics-365-crm","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2019\/06\/add-fields-in-xml-mapping-of-existing-word-template-used-in-dynamics-365-crm\/","title":{"rendered":"Add Fields in XML Mapping of Existing Word Template Used In Dynamics 365 CRM"},"content":{"rendered":"<h2><strong>Introduction<\/strong><\/h2>\n<p style=\"text-align: justify;\">In Microsoft Dynamics 365 CRM there is an option to create Word Templates. The Word Template feature was introduced in the MS Dynamics CRM 2016. It is useful to create templates\u00a0for generating documents in a standardized format. To display entity data in standardized format we can export word template. But, these word templates contain the entity metadata (i.e. fields, relationships, etc.) till the template is downloaded.<\/p>\n<p style=\"text-align: justify;\">In our last blog we have seen <a href=\"https:\/\/www.inogic.com\/blog\/2016\/02\/word-template-feature-in-dynamics-crm-2016\/\" target=\"_blank\" rel=\"noopener noreferrer\">Word Template feature in Dynamics CRM 2016<\/a>, in this blog we will see how we can add the new fields of entity in XML Mapping of word template.<\/p>\n<p style=\"text-align: justify;\">Here, on <strong>Contact<\/strong> entity we have created a new field with name \u201cContact Type (new_contacttype)\u201d and this field is not present in XML Mapping of Word Template as shown below.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-18885\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/1XML-Mapping.png\" alt=\"XML Mapping\" width=\"1182\" height=\"511\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/1XML-Mapping.png 1182w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/1XML-Mapping-300x130.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/1XML-Mapping-768x332.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/1XML-Mapping-1024x443.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/1XML-Mapping-660x285.png 660w\" sizes=\"(max-width: 1182px) 100vw, 1182px\" \/><\/p>\n<p>Below are the steps to add this field in XML Mapping of existing Word Template:<\/p>\n<p><strong>1<\/strong>. We are considering \u201ccontact.docx\u201d custom word template file and are adding new fields in this word template.<\/p>\n<p><strong>2<\/strong>. To add new fields in this file, rename \u201ccontact.docx\u201d word template file and change extension from \u201c.docx\u201d to \u201c.zip\u201d.<\/p>\n<p><strong>3<\/strong>. Extract \u201ccontact.zip\u201d file and you will see the extracted folder as below:<\/p>\n<p style=\"padding-left: 40px;\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18886\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/2XML-Mapping.png\" alt=\"XML Mapping\" width=\"616\" height=\"177\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/2XML-Mapping.png 616w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/2XML-Mapping-300x86.png 300w\" sizes=\"(max-width: 616px) 100vw, 616px\" \/><\/p>\n<p><strong>4<\/strong>. Open \u201c<strong>customXml<\/strong>\u201d folder from extracted \u201ccontact.zip\u201d file and then open \u201c<strong>xml<\/strong>\u201d file in editor to add fields.<\/p>\n<p><strong>5<\/strong>. Then add the new field in \u201citem1.xml\u201d file as shown below:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-18887\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/3XML-Mapping.png\" alt=\"XML Mapping\" width=\"836\" height=\"475\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/3XML-Mapping.png 836w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/3XML-Mapping-300x170.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/3XML-Mapping-768x436.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/3XML-Mapping-660x375.png 660w\" sizes=\"(max-width: 836px) 100vw, 836px\" \/><\/p>\n<p style=\"text-align: justify;\">Here, we are adding the field with logical name <strong>new_contacttype <\/strong>in XML Mapping of word template. You can add multiple fields like this as well. After adding all necessary fields save the \u201c<strong>item.xml<\/strong>\u201d file.<\/p>\n<p><strong>6<\/strong>. Go back to the \u201ccontact.zip\u201d folder and navigate to \u201ccustomXml\u201d folder. Then, replace \u201c<strong>xml<\/strong>\u201d file of \u201ccontact.zip\u201d file with this edited file.<\/p>\n<p><strong>7<\/strong>. After that rename \u201ccontact.zip\u201d and replace extension back to \u201c.docx\u201d.<\/p>\n<p><strong>8<\/strong>. Now, you will see the \u201cContact Type\u201d field in XML Mapping of \u201ccontact.docx\u201d word template as shown below and you can use this field to map in word template.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-18888\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/4XML-Mapping.png\" alt=\"XML Mapping\" width=\"1196\" height=\"496\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/4XML-Mapping.png 1196w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/4XML-Mapping-300x124.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/4XML-Mapping-768x319.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/4XML-Mapping-1024x425.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/4XML-Mapping-660x274.png 660w\" sizes=\"(max-width: 1196px) 100vw, 1196px\" \/><\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>You can add new fields of Dynamics 365 CRM entity in mapping XML of word templates.<\/p>\n<h2 style=\"text-align: left;\"><div class=\"su-heading su-heading-style-default su-heading-align-center\" id=\"\" style=\"font-size:15px;margin-bottom:5px\"><div class=\"su-heading-inner\">Cut short 90% of your manual work and repetitive data entry!<\/div><\/div><\/h2>\n<p style=\"text-align: left;\"><em>Get 1 Click apps and say goodbye to all repetitive data entry in CRM &#8211;<\/em><br \/>\n<em><strong><a href=\"https:\/\/bit.ly\/3oH7dYw\" target=\"_blank\" rel=\"noopener noreferrer\">Click2Clone<\/a> <\/strong>\u2013 Clone\/Copy Dynamics 365 CRM records in 1 Click<\/em><br \/>\n<em><strong><a href=\"https:\/\/bit.ly\/3EPjAYc\" target=\"_blank\" rel=\"noopener noreferrer\">Click2Export<\/a><\/strong> \u2013 Export Dynamics 365 CRM Report\/CRM Views\/Word\/Excel template in 1 Click<\/em><br \/>\n<em><strong><a href=\"https:\/\/bit.ly\/3EN8h2v\" target=\"_blank\" rel=\"noopener noreferrer\">Click2Undo<\/a><\/strong> \u2013 Undo &amp; Restore Dynamics 365 CRM data in 1 Click<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In Microsoft Dynamics 365 CRM there is an option to create Word Templates. The Word Template feature was introduced in the MS Dynamics CRM 2016. It is useful to create templates\u00a0for generating documents in a standardized format. To display entity data in standardized format we can export word template. But, these word templates contain\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2019\/06\/add-fields-in-xml-mapping-of-existing-word-template-used-in-dynamics-365-crm\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":23727,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[27],"tags":[1877],"class_list":["post-18884","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-field-service-2","tag-xml-mapping"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/18884","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=18884"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/18884\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media\/23727"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=18884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=18884"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=18884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}