{"id":14526,"date":"2019-02-12T10:48:57","date_gmt":"2019-02-12T10:48:57","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=14526"},"modified":"2019-02-12T10:48:57","modified_gmt":"2019-02-12T10:48:57","slug":"populate-multi-entity-lookup-fields-of-dynamics-365-ce-in-powerapps","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2019\/02\/populate-multi-entity-lookup-fields-of-dynamics-365-ce-in-powerapps\/","title":{"rendered":"Populate Multi Entity Lookup Fields of Dynamics 365 CE in PowerApps"},"content":{"rendered":"<p style=\"text-align: justify;\">As you know using PowerApps, we can create or Update the records in the Dynamics 365 CE. Here, in Dynamics 365 CE we have various types of fields in an Entity. So, while working with Lookup type field, we faced an issue where we were unable to create\/update the record.<\/p>\n<p style=\"text-align: justify;\">But issue occurred only for Lookup field which was a type of Multi Entity lookup field. We know there are fields with Multi Entity like <strong>Customers<\/strong> and <strong>Regarding<\/strong> fields.<\/p>\n<p style=\"text-align: justify;\">In this blog, we are going to explain the scenario where we were trying to create \u201cTask\u201d record against a specific Account record. As you know, in the Task entity, there is a Regarding field (multi lookup type) where we can set the specific account.<\/p>\n<p style=\"text-align: justify;\">For this, we used PATCH function to create\/update the record where we were setting the value of the Regarding field, but it was unable to set the entity type of the lookup field and showed an error \u201c<em>The type of this argument \u2018_reagrdingobjectidid_type\u2019 does not match the Expected type \u2018Guid\u2019.Found type \u2018Text\u2019<\/em>.\u201d<\/p>\n<p style=\"text-align: justify;\">You can see error in the below screenshot of the PATCH function which is written on the click of the button to submit the data.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-14527\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/02\/1Dynamics-365-in-PowerApps.png\" alt=\"Dynamics 365 in PowerApps\" width=\"1020\" height=\"111\" \/><\/p>\n<p style=\"text-align: justify;\">So, we checked why it was unable to set the name of the entity in String format but could not find much on the topic. However, after digging deep in PowerApps, we found that there was a setting in the that allows GUID types data in String format.<\/p>\n<p style=\"text-align: justify;\">To fix this issue, we modified settings of the PowerApps as shown below and were able to set the entity name in the \u2018_reagrdingobjectidid_type\u2019 field.<\/p>\n<p>You can see below steps to modify the App settings:<\/p>\n<p>1. Select the App in PowerApps in which you are working and select <strong>Edit<\/strong><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-14528\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/02\/2Dynamics-365-in-PowerApps.png\" alt=\"Dynamics 365 in PowerApps\" width=\"1020\" height=\"315\" \/><\/p>\n<p>2. Once you enter the App, you can see File option at the top and click on it.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-14529\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/02\/3Dynamics-365-in-PowerApps.png\" alt=\"Dynamics 365 in PowerApps\" width=\"1020\" height=\"125\" \/><\/p>\n<p>3.\u00a0 After clicking you will see the \u201c<strong>App Settings<\/strong>,\u201d click on it and select the <strong>Advanced settings<\/strong>:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-14530\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/02\/4Dynamics-365-in-PowerApps.png\" alt=\"Dynamics 365 in PowerApps\" width=\"1020\" height=\"418\" \/><\/p>\n<p>4. After selecting the \u201cAdvanced settings,\u201d you will see an option \u201cUse GUID data types instead of strings.\u201d Toggle to <strong>Turn Off<\/strong> as shown below:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-14531\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/02\/5Dynamics-365-in-PowerApps.png\" alt=\"Dynamics 365 in PowerApps\" width=\"1020\" height=\"125\" \/><\/p>\n<p>5. Now SAVE the App and restart. You are all set to start Editing App and will be able to set the Regarding field without any errors.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-14532 alignnone\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/02\/6Dynamics-365-in-PowerApps.png\" alt=\"Dynamics 365 in PowerApps\" width=\"768\" height=\"787\" \/><\/p>\n<p>Hope this helps!<\/p>\n<blockquote><p><em><strong>To help evaluate your business needs and design a custom app for your specific requests reach out to us at\u00a0<a href=\"mailto:crm@inogic.com\" target=\"_blank\" rel=\"noopener noreferrer\">crm@inogic.com<\/a>\u00a0| Read our blog series on\u00a0<a href=\"https:\/\/www.inogic.com\/blog\/category\/dynamics-365\/microsoft-powerapps\/\" target=\"_blank\" rel=\"noopener noreferrer\">Microsoft PowerApps<\/a><\/strong><\/em><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>As you know using PowerApps, we can create or Update the records in the Dynamics 365 CE. Here, in Dynamics 365 CE we have various types of fields in an Entity. So, while working with Lookup type field, we faced an issue where we were unable to create\/update the record. But issue occurred only for\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2019\/02\/populate-multi-entity-lookup-fields-of-dynamics-365-ce-in-powerapps\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":14535,"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,44,38],"tags":[572,1170],"class_list":["post-14526","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dynamics-365","category-power-apps","category-microsoft-powerapps","tag-dynamics-365-powerapps","tag-microsoft-powerapps"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/14526","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=14526"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/14526\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media\/14535"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=14526"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=14526"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=14526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}