{"id":11159,"date":"2018-02-07T17:30:43","date_gmt":"2018-02-07T12:00:43","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=11159"},"modified":"2018-02-07T17:30:43","modified_gmt":"2018-02-07T12:00:43","slug":"migrating-dynamic-365-v9-0-multi-select-option-set-field-data-using-ssis","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2018\/02\/migrating-dynamic-365-v9-0-multi-select-option-set-field-data-using-ssis\/","title":{"rendered":"Migrating Dynamics 365 v9.0 Multi Select Option Set Field Data using SSIS"},"content":{"rendered":"<p><strong>Introduction:<\/strong><\/p>\n<p>Microsoft Dynamics 365 v9.0 brings some of the most awaited features and enhancements. One of the important feature introduced in Dynamics v9.0 is <strong>Multi Select Option Set<\/strong>. Prior to Dynamics 365 v9, there was no provision to use multi-select option set field. Our\u00a0<a href=\"https:\/\/www.inogic.com\/blog\/2017\/11\/import-data-with-multi-select-option-set-values-in-dynamics-365-v9\/\">this<\/a> blog explains how data import works for multi-select option set field.<\/p>\n<p>In this blog, we will see Migrating Dynamic 365 Multi Select Option Set Field data using SSIS.<\/p>\n<p><strong>Migrating Dynamic 365 Multi Select Option Set Field data:<\/strong><\/p>\n<p><a href=\"https:\/\/www.kingswaysoft.com\/products\/ssis-integration-toolkit-for-microsoft-dynamics-crm\" target=\"_blank\" rel=\"noopener noreferrer\">SSIS Toolkit<\/a>\u00a0from our friends at KingswaySoft has always been our preferred tool for data migration and in the latest release, the team has introduced <a href=\"http:\/\/www.kingswaysoft.com\/about-us\/news\/2017\/10\/06\/SSIS-Integration-Toolkit-Autumn-2017-Release-Wave\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>v9.1 of SSIS Integration Toolkit for Microsoft Dynamics 365<\/strong><\/a><strong>.<\/strong><\/p>\n<p><strong>Below are the steps to migrate the Multi Select Option set field value:<\/strong><\/p>\n<p>For example, consider a Multi Select option set field i.e. Select Choices (new_selectchoices)<\/p>\n<ol>\n<li>Create Connection Manager for Source and Destination CRM.<\/li>\n<li>Map the MultiSelect option set field in the Destination as given in below screenshot.<img decoding=\"async\" class=\"aligncenter size-full wp-image-11160\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2018\/02\/multi-select-optionset-migration1.png\" alt=\"multi-select-optionset-migration1\" width=\"702\" height=\"122\" \/><\/li>\n<li>If you want to change any options in the MultiSelect Option Set field for Destination CRM, then you need to follow the below steps :<\/li>\n<\/ol>\n<ul>\n<li>Add an output column.<img decoding=\"async\" class=\"aligncenter size-full wp-image-11161\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2018\/02\/multi-select-optionset-migration2.png\" alt=\"multi-select-optionset-migration2\" width=\"625\" height=\"344\" \/><\/li>\n<li>\u00a0 Write custom code in a script as given below.\n<pre class=\"lang:default decode:true\">  private void SetMultiOptionSetValue(ref Input0Buffer Row)\n    {\n        string functionName = \"SetMultiOptionSetValue \";\n        List&lt;string&gt; listSTR = new List&lt;string&gt;();\n        string updatedString = string.Empty;\n        string s = string.Empty;\n        try\n        {\n          string selectChoicesByName = Row.newselectchoicesname;\n\n            listSTR = selectChoicesByName.Split(';').ToList();\n\/\/Note: you can use value instead of string also\n            listSTR.Remove(\"Item 4\");\n            listSTR.Add(\"custom\");\n            for (int i = 0; i &lt; listSTR.Count; i++)\n            {\n                if (i == listSTR.Count - 1)\n                {\n                    s += listSTR.ElementAt(i);\n                }\n                else\n                { s += listSTR.ElementAt(i) + \";\"; }\n            }\n\n            Row.opMultiSelect = s;\n              \n        }\n        catch (Exception ex)\n        {\n\n            throw new Exception(functionName + ex.Message); ;\n        }\n    }<\/pre>\n<p><em>We need to concatenate all the option\u2019s values in a string separated by \u201c;\u201d, Here we are storing the option\u2019s value in a string and assigning it to output column i.e. opMultiSelect.<\/em><\/p>\n<p>4. Map this output column to the Destination MultiSelect Option Set field.<img decoding=\"async\" class=\"aligncenter size-full wp-image-11162\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2018\/02\/multi-select-optionset-migration3.png\" alt=\"multi-select-optionset-migration3\" width=\"821\" height=\"162\" \/><\/p>\n<p>In above example, we have mapped Multi Select Option Set field with the label. Like above user can map with the values also.<\/p>\n<p><strong><em>Note: Please use the <\/em><\/strong><a href=\"http:\/\/www.kingswaysoft.com\/products\/ssis-integration-toolkit-for-microsoft-dynamics-365\/download\" target=\"_blank\" rel=\"noopener noreferrer\"><strong><em>latest<\/em><\/strong><\/a><strong><em> version of Kingswaysoft for above Migration.<\/em><\/strong><\/p>\n<p><strong>Conclusion:<\/strong><\/p>\n<p>We can migrate Multi Select Option Set field from one environment to another using steps described above. If you are migrating Multi Select Option Set field from one environment to another using KingswaySoft SSIS toolkit for Dynamics 365 v9.0 then you need to map Multi Select Option Set field with label or value.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: Microsoft Dynamics 365 v9.0 brings some of the most awaited features and enhancements. One of the important feature introduced in Dynamics v9.0 is Multi Select Option Set. Prior to Dynamics 365 v9, there was no provision to use multi-select option set field. Our\u00a0this blog explains how data import works for multi-select option set field.\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2018\/02\/migrating-dynamic-365-v9-0-multi-select-option-set-field-data-using-ssis\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":11169,"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,57],"tags":[563,1180],"class_list":["post-11159","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dynamics-365-v9-2","category-ssis","tag-dynamics-365-migration","tag-migration-using-ssis"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/11159","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=11159"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/11159\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media\/11169"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=11159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=11159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=11159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}