{"id":23494,"date":"2020-05-07T10:33:32","date_gmt":"2020-05-07T10:33:32","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=23494"},"modified":"2020-05-07T10:33:32","modified_gmt":"2020-05-07T10:33:32","slug":"how-to-resolve-error-loading-control-on-sales-literature-attachment-after-removing-the-file-programmatically","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2020\/05\/how-to-resolve-error-loading-control-on-sales-literature-attachment-after-removing-the-file-programmatically\/","title":{"rendered":"How to resolve Error Loading Control on Sales Literature Attachment after removing the file programmatically"},"content":{"rendered":"<h2><strong>Introduction<\/strong><\/h2>\n<p style=\"text-align: justify;\">We had a requirement from our client that they needed to remove all sales literature attachments from CRM. While doing this we got an error &#8211; <strong>\u201cError loading control\u201d<\/strong> on file control of sales literature item. In this blog will find out how to resolve this.<\/p>\n<p>Error on file control &#8211;<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-23493\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/05\/1Error-Loading-Control.png\" alt=\"Error Loading Control\" width=\"1227\" height=\"593\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/05\/1Error-Loading-Control.png 1227w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/05\/1Error-Loading-Control-300x145.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/05\/1Error-Loading-Control-768x371.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/05\/1Error-Loading-Control-1024x495.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/05\/1Error-Loading-Control-660x319.png 660w\" sizes=\"(max-width: 1227px) 100vw, 1227px\" \/><\/p>\n<p>In previous version of Dynamics 365 CRM, below code worked fine.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-23496\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/05\/2Error-Loading-Control.png\" alt=\"Error Loading Control\" width=\"700\" height=\"153\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/05\/2Error-Loading-Control.png 700w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/05\/2Error-Loading-Control-300x66.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/05\/2Error-Loading-Control-660x144.png 660w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>But after October 2019 Wave 2 release, attachment is removing properly but getting error on file control as shown in above screenshot.<\/p>\n<p style=\"text-align: justify;\">So, we figured out that for this we need to add one more parameter i.e. \u201cMode\u201d= string.Empty (If file is uploaded then it contains \u201c0\u201d) while updating a record of sales literature item for removing all reference of sales attachment document from CRM.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-23497\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/05\/3Error-Loading-Control.png\" alt=\"Error Loading Control\" width=\"692\" height=\"152\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/05\/3Error-Loading-Control.png 692w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/05\/3Error-Loading-Control-300x66.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/05\/3Error-Loading-Control-660x145.png 660w\" sizes=\"(max-width: 692px) 100vw, 692px\" \/><\/p>\n<p>Now you can update this record by uploading documents.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-23495\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/05\/4Error-Loading-Control.png\" alt=\"Error Loading Control\" width=\"1201\" height=\"526\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/05\/4Error-Loading-Control.png 1201w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/05\/4Error-Loading-Control-300x131.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/05\/4Error-Loading-Control-768x336.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/05\/4Error-Loading-Control-1024x448.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/05\/4Error-Loading-Control-660x289.png 660w\" sizes=\"(max-width: 1201px) 100vw, 1201px\" \/><\/p>\n<h2>Conclusion<\/h2>\n<p style=\"text-align: justify;\">After moving all your sales literature attachments from Dynamics 365 CRM now error on file control will not come and you can update same sales literature attachment record with new attachment if you want.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction We had a requirement from our client that they needed to remove all sales literature attachments from CRM. While doing this we got an error &#8211; \u201cError loading control\u201d on file control of sales literature item. In this blog will find out how to resolve this. Error on file control &#8211; In previous version\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2020\/05\/how-to-resolve-error-loading-control-on-sales-literature-attachment-after-removing-the-file-programmatically\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":23498,"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":[18,19],"tags":[2037],"class_list":["post-23494","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dynamics-365-v9-2","category-dynamics-crm","tag-error-loading-control"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/23494","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=23494"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/23494\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media\/23498"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=23494"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=23494"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=23494"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}