{"id":32363,"date":"2022-08-10T14:57:48","date_gmt":"2022-08-10T09:27:48","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=32363"},"modified":"2023-04-11T14:52:49","modified_gmt":"2023-04-11T09:22:49","slug":"multi-select-option-field-in-dynamics-365-v9-2-using-power-automate","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2022\/08\/multi-select-option-field-in-dynamics-365-v9-2-using-power-automate\/","title":{"rendered":"Multi-Select Option field in Dynamics 365 V9.2 using Power Automate"},"content":{"rendered":"<h2><strong>Introduction<\/strong><\/h2>\n<p>With every release of Dynamics 365, Microsoft introduces a wide variety of features. Some of which open new doors of opportunity whereas some help in overcoming existing limitations. Introduction of Multi-Select Option Set was kind of both.<\/p>\n<p>However, as a customizer, we still face a few roadblocks when it comes to dealing with any Multi-Select Option Set field. However, recently while working on a requirement, we were able to set default values for a Multi-Select Option Set using Power Automate.<\/p>\n<p>Now, let\u2019s further explore how this was done.<\/p>\n<p><strong>Recently<\/strong>, we came across a scenario where we wanted to set values for the Multi-Select Option Set field named <strong>Regions<\/strong> based on the domain of the email addresses from two of the email address fields named <strong>Sales Email<\/strong> and <strong>Support Email. <\/strong>We achieved this by using Power Automate flows (Cloud Flows) as shown below.<\/p>\n<p><strong>Step 1:<\/strong><\/p>\n<p>On the Account entity form we have the <strong>Sales Email<\/strong>, <strong>Support Email,<\/strong> and the <strong>Regions<\/strong> field. The <strong>Sales Email<\/strong> and the <strong>Support Email<\/strong> are the email Id fields based on which we would need to set the value of Multi Option set field <strong>Regions<\/strong>.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-32373\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/1Power-Automate.png\" alt=\"Power Automate\" width=\"546\" height=\"230\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/1Power-Automate.png 546w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/1Power-Automate-300x126.png 300w\" sizes=\"(max-width: 546px) 100vw, 546px\" \/><\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-32372\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/2Power-Automate.png\" alt=\"Power Automate\" width=\"544\" height=\"243\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/2Power-Automate.png 544w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/2Power-Automate-300x134.png 300w\" sizes=\"(max-width: 544px) 100vw, 544px\" \/><\/p>\n<p>For the above example, let\u2019s say we have the Sales Email Id with the domain containing <em>\u2018<strong>.com\u2019<\/strong><\/em> whereas the Support Email Id has the domain containing \u2018<strong><em>.au\u2019<\/em><\/strong>. So now based on these, the <strong>Regions<\/strong> must get set as <strong><em>USA<\/em><\/strong> and <strong><em>Australia<\/em><\/strong>.<\/p>\n<p><a href=\"https:\/\/bit.ly\/3Us8CjF\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"alignnone  wp-image-34414\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/Business-Process-Checklist.gif\" alt=\"Business Process Checklist\" width=\"836\" height=\"209\" \/><\/a><\/p>\n<p><strong>Step 2:<\/strong> Create a Power Automate flow.<\/p>\n<p>To create a Power Automate flow navigate to <a href=\"https:\/\/admin.powerplatform.microsoft.com\/\" target=\"_blank\" rel=\"noopener\">Power Platform Admin Center<\/a> -&gt; <strong>Open your solution<\/strong> -&gt; <strong>New<\/strong> -&gt; <strong>Automation<\/strong> -&gt; <strong>Cloud Flow<\/strong> -&gt; <strong>Automated<\/strong>.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-32371\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/3Power-Automate.png\" alt=\"Power Automate\" width=\"562\" height=\"299\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/3Power-Automate.png 562w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/3Power-Automate-300x160.png 300w\" sizes=\"(max-width: 562px) 100vw, 562px\" \/><\/p>\n<p><strong>Step 3:<\/strong> Next, add steps.<\/p>\n<p>Use the Microsoft Dataverse Trigger <strong>When a row is added, modified or deleted<\/strong>.<\/p>\n<p>Then set the value of <strong>Change type<\/strong> to <strong>Added or Modified<\/strong>.<\/p>\n<p><strong>Added<\/strong>: Triggers on creation of a Record.<\/p>\n<p>Modified: Triggers on updation of a Record.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-32370\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/4Power-Automate.png\" alt=\"Power Automate\" width=\"539\" height=\"198\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/4Power-Automate.png 539w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/4Power-Automate-300x110.png 300w\" sizes=\"(max-width: 539px) 100vw, 539px\" \/><\/p>\n<p><strong>Step 4: <\/strong>Add condition in the next step.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-32369\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/5Power-Automate.png\" alt=\"Power Automate\" width=\"531\" height=\"360\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/5Power-Automate.png 531w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/5Power-Automate-300x203.png 300w\" sizes=\"(max-width: 531px) 100vw, 531px\" \/><\/p>\n<p><strong>Step 5:<\/strong> In the conditional step we need to add the conditions. And as per the example, since we are setting the value of the Multiselect option set based on the values in the <strong>Sales Email<\/strong> and <strong>Support Email <\/strong>fields, we will use these 2 to add the conditions as shown below.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-32368\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/6Power-Automate.png\" alt=\"Power Automate\" width=\"1236\" height=\"554\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/6Power-Automate.png 1236w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/6Power-Automate-300x134.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/6Power-Automate-1024x459.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/6Power-Automate-768x344.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/6Power-Automate-660x296.png 660w\" sizes=\"(max-width: 1236px) 100vw, 1236px\" \/><\/p>\n<p>We have added the condition as, if Sales Email contains\u201d.com\u201d and Support Email contains \u201c.au\u201d then auto populate the <strong>Regions<\/strong> as \u201cUSA\u201d and \u201cAustralia\u201d.<\/p>\n<p><strong>Step 6:<\/strong> Post adding the condition, under <strong>If Yes<\/strong> add the action Microsoft Dataverse <strong>\u201cUpdate a row\u201d<\/strong>.<\/p>\n<p>In <strong>Table name<\/strong> select the Entity\/Table name on which flow needs to run (Executed).<\/p>\n<p><strong>Row Id<\/strong> is unique identifier of the Entity\/Table.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-32367\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/7Power-Automate.png\" alt=\"Power Automate\" width=\"1244\" height=\"493\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/7Power-Automate.png 1244w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/7Power-Automate-300x119.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/7Power-Automate-1024x406.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/7Power-Automate-768x304.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/7Power-Automate-660x262.png 660w\" sizes=\"(max-width: 1244px) 100vw, 1244px\" \/><\/p>\n<p>In action we have passed the actual value of the regions using the custom expression.<\/p>\n<p>To add the custom expression, we need to select \u201c<strong>Enter custom value<\/strong>\u201d.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-32366\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/8Power-Automate.png\" alt=\"8Power Automate\" width=\"530\" height=\"202\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/8Power-Automate.png 530w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/8Power-Automate-300x114.png 300w\" sizes=\"(max-width: 530px) 100vw, 530px\" \/><\/p>\n<p>In expression field enter the value of the option in <strong>Regions<\/strong> field\/column \u00e0 Click on save and the same will get set in the multi-option set field(i.e. Regions).<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-32365\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/9Power-Automate.png\" alt=\"Power Automate\" width=\"923\" height=\"246\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/9Power-Automate.png 923w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/9Power-Automate-300x80.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/9Power-Automate-768x205.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/9Power-Automate-660x176.png 660w\" sizes=\"(max-width: 923px) 100vw, 923px\" \/><\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-32364\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/10Power-Automate.png\" alt=\"Power Automate\" width=\"935\" height=\"268\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/10Power-Automate.png 935w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/10Power-Automate-300x86.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/10Power-Automate-768x220.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/08\/10Power-Automate-660x189.png 660w\" sizes=\"(max-width: 935px) 100vw, 935px\" \/><\/p>\n<p>As per the example, the value of option USA is \u2019<strong>100000000<\/strong>\u2018and for Australia \u2018<strong>100000003<\/strong>\u2019 which will get set.<\/p>\n<h2><strong>Conclusion:<\/strong><\/h2>\n<p>As illustrated above, we can easily set the values in Multiselect <strong>Optionset<\/strong> field by using <a href=\"https:\/\/www.inogic.com\/services\/microsoft-power-platform\/microsoft-power-automate\/\" target=\"_blank\" rel=\"noopener\">Power Automate<\/a>.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/services\/\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"alignnone size-full wp-image-34038\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/Microsoft-Power-Platform-3-1.png\" alt=\"Microsoft Power Platform (3)\" width=\"800\" height=\"200\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/Microsoft-Power-Platform-3-1.png 800w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/Microsoft-Power-Platform-3-1-300x75.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/Microsoft-Power-Platform-3-1-768x192.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/Microsoft-Power-Platform-3-1-660x165.png 660w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction With every release of Dynamics 365, Microsoft introduces a wide variety of features. Some of which open new doors of opportunity whereas some help in overcoming existing limitations. Introduction of Multi-Select Option Set was kind of both. However, as a customizer, we still face a few roadblocks when it comes to dealing with any\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2022\/08\/multi-select-option-field-in-dynamics-365-v9-2-using-power-automate\/\">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":[18,1985,2361],"tags":[1975],"class_list":["post-32363","post","type-post","status-publish","format-standard","hentry","category-dynamics-365-v9-2","category-power-automate","category-technical","tag-power-automate"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/32363","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=32363"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/32363\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=32363"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=32363"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=32363"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}