{"id":25469,"date":"2020-11-06T11:38:59","date_gmt":"2020-11-06T11:38:59","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=25469"},"modified":"2021-11-29T17:07:40","modified_gmt":"2021-11-29T11:37:40","slug":"how-to-remove-guid-from-folder-name-in-dynamics-365-crm-and-sharepoint-integration","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2020\/11\/how-to-remove-guid-from-folder-name-in-dynamics-365-crm-and-sharepoint-integration\/","title":{"rendered":"How to remove GUID from folder name in Dynamics 365 CRM and SharePoint integration"},"content":{"rendered":"<pre style=\"background-color: yellow; padding: 5px; overflow: hidden;\"><span style=\"font-size: 13px; font-family: Helvetica; color: #000000;\"> <a href=\"https:\/\/www.inogic.com\/product\/productivity-apps\/dynamics-365-crm-sharepoint-security-metadata-sync\" target=\"_blank\" rel=\"noopener\">SharePoint Security Sync<\/a>\u00a0enables you to create custom document\u00a0library structure in SharePoint and also <br>customize the record folder name which is quite helpful for data storage and management in a smart way!<\/span><\/pre>\n<h2>Introduction<\/h2>\n<p style=\"text-align: justify;\">Recently we had a requirement from a client, they wanted to remove the GUID appended to the folder name.<\/p>\n<p>There is a hidden way to achieve this. It is stored in an OrganizationSettings, though they have not exposed a way on a UI to update this, however, this can be done programmatically.<\/p>\n<p>Please follow this blog to understand the approach.<\/p>\n<p>Default structure of SharePoint folder name (PrimaryFieldName_RecordGUID)<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/remove-GUID-from-folder-name-in-Dynamics-CRM-and-SharePoint-integration-1.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-25470 size-full\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/remove-GUID-from-folder-name-in-Dynamics-CRM-and-SharePoint-integration-1.png\" alt=\"remove GUID from folder name in Dynamics CRM and SharePoint integration\" width=\"1060\" height=\"478\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/remove-GUID-from-folder-name-in-Dynamics-CRM-and-SharePoint-integration-1.png 1060w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/remove-GUID-from-folder-name-in-Dynamics-CRM-and-SharePoint-integration-1-300x135.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/remove-GUID-from-folder-name-in-Dynamics-CRM-and-SharePoint-integration-1-768x346.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/remove-GUID-from-folder-name-in-Dynamics-CRM-and-SharePoint-integration-1-1024x462.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/remove-GUID-from-folder-name-in-Dynamics-CRM-and-SharePoint-integration-1-660x298.png 660w\" sizes=\"(max-width: 1060px) 100vw, 1060px\" \/><\/a><\/p>\n<p>To change the default behavior of the folder name we need to update <strong>CreateSPFoldersUsingNameandGuid<\/strong> property of <strong>organization<\/strong> to <strong>false<\/strong>.<\/p>\n<p>Kindly follow the below steps to do that:<\/p>\n<p>Below is the code snippet which I have tried from console application(c#) (if you want you can try with plugin\/custom assembly as well) &#8211;<\/p>\n<pre class=\"lang:css gutter:true start:1\">Entity orgEntity = new Entity(\"organization\");\r\n\r\norgEntity.Id = new Guid(\u201c46f31389-4d7d-43d7-b347-fae0d47f8b7f\");\r\n\r\norgEntity[\"orgdborgsettings\"] = \"&lt;OrgSettings&gt;&lt;CreateSPFoldersUsingNameandGuid&gt;false&lt;\/CreateSPFoldersUsingNameandGuid&gt;&lt;\/OrgSettings&gt;\u201d;\r\n\r\n_crmhandler.UpdateRecord(orgEntity);\r\n<\/pre>\n<p>To get the organization ID, refer to below screenshot \u2013<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/remove-GUID-from-folder-name-in-Dynamics-CRM-and-SharePoint-integration-2.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-25471 size-full\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/remove-GUID-from-folder-name-in-Dynamics-CRM-and-SharePoint-integration-2.png\" alt=\"remove GUID from folder name in Dynamics CRM and SharePoint integration\" width=\"1717\" height=\"894\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/remove-GUID-from-folder-name-in-Dynamics-CRM-and-SharePoint-integration-2.png 1717w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/remove-GUID-from-folder-name-in-Dynamics-CRM-and-SharePoint-integration-2-300x156.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/remove-GUID-from-folder-name-in-Dynamics-CRM-and-SharePoint-integration-2-768x400.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/remove-GUID-from-folder-name-in-Dynamics-CRM-and-SharePoint-integration-2-1024x533.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/remove-GUID-from-folder-name-in-Dynamics-CRM-and-SharePoint-integration-2-660x344.png 660w\" sizes=\"(max-width: 1717px) 100vw, 1717px\" \/><\/a><\/p>\n<p>Now when SharePoint folder will be created then it will contain only name not GUID.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/remove-GUID-from-folder-name-in-Dynamics-CRM-and-SharePoint-integration-3.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-25472 size-full\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/remove-GUID-from-folder-name-in-Dynamics-CRM-and-SharePoint-integration-3.png\" alt=\"remove GUID from folder name in Dynamics CRM and SharePoint integration\" width=\"1062\" height=\"497\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/remove-GUID-from-folder-name-in-Dynamics-CRM-and-SharePoint-integration-3.png 1062w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/remove-GUID-from-folder-name-in-Dynamics-CRM-and-SharePoint-integration-3-300x140.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/remove-GUID-from-folder-name-in-Dynamics-CRM-and-SharePoint-integration-3-768x359.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/remove-GUID-from-folder-name-in-Dynamics-CRM-and-SharePoint-integration-3-1024x479.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/remove-GUID-from-folder-name-in-Dynamics-CRM-and-SharePoint-integration-3-660x309.png 660w\" sizes=\"(max-width: 1062px) 100vw, 1062px\" \/><\/a><\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>We can easily get rid of GUIDs in SharePoint folder name by changing Org setting.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/product\/productivity-apps\/dynamics-365-crm-sharepoint-security-metadata-sync\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-25547\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/sss-products-1.jpg\" alt=\"\" width=\"800\" height=\"200\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/sss-products-1.jpg 800w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/sss-products-1-300x75.jpg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/sss-products-1-768x192.jpg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/11\/sss-products-1-660x165.jpg 660w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>SharePoint Security Sync\u00a0enables you to create custom document\u00a0library structure in SharePoint and also customize the record folder name which is quite helpful for data storage and management in a smart way! Introduction Recently we had a requirement from a client, they wanted to remove the GUID appended to the folder name. There is a hidden\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2020\/11\/how-to-remove-guid-from-folder-name-in-dynamics-365-crm-and-sharepoint-integration\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":0,"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":[16,18,19,31,53],"tags":[1888,877,1615,1616],"class_list":["post-25469","post","type-post","status-publish","format-standard","hentry","category-dynamics-365","category-dynamics-365-v9-2","category-dynamics-crm","category-integrations-dynamics-crm","category-sharepoint","tag-dynamics-365-sharepoint-integration","tag-guid","tag-sharepoint-integration","tag-sharepoint-integration-with-dynamics-crm"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/25469","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=25469"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/25469\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=25469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=25469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=25469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}