{"id":29457,"date":"2021-09-30T16:45:15","date_gmt":"2021-09-30T11:15:15","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=29457"},"modified":"2023-09-08T12:57:21","modified_gmt":"2023-09-08T07:27:21","slug":"use-of-code-components-in-power-apps-portal","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2021\/09\/use-of-code-components-in-power-apps-portal\/","title":{"rendered":"Use of Code Components in Power Apps Portal"},"content":{"rendered":"<h3><strong>Introduction<\/strong><\/h3>\n<p>Microsoft in the latest release brought many new features in Dynamics 365 CRM which also includes one of the most awaited features &#8211; support of Code Components in Power Apps Portal.<\/p>\n<p>In this blog, we will see how we can configure and show a PCF Control in the Power Apps Portal. Kindly note this feature is still in <a href=\"https:\/\/docs.microsoft.com\/en-us\/powerapps\/maker\/portals\/component-framework\" target=\"_blank\" rel=\"noopener\">Preview stage<\/a>.<\/p>\n<p>Since it is very easy to use, we will make this blog precise and short.<\/p>\n<p>At first, Power Apps Portal should be configured. To know more on how to configure the Power Apps portal refer this <a href=\"https:\/\/docs.microsoft.com\/en-us\/powerapps\/maker\/portals\/create-portal\" target=\"_blank\" rel=\"noopener\"><strong>link<\/strong><\/a>.<\/p>\n<p>Once the Power Apps Portal is configured, when you navigate to the portal page you will see some existing pages like the <strong>Contact Us <\/strong>page which we would be using to show the PCF Control in the Power Apps portal in the below example. The Contact Us page is associated to the Lead table and thus this page shows columns from the Lead table Form.<\/p>\n<p><strong>Step 1:<\/strong> Move to <a href=\"https:\/\/make.powerapps.com\/\" target=\"_blank\" rel=\"noopener\">make.powerapps.com<\/a> and select your environment on which you have enabled the Power Apps Portal.<\/p>\n<p><strong>Step 2: <\/strong>Create a new solution and add Lead table along with 1 Form that is <strong>\u201cContact Us Personal Web Form\u201d<\/strong> in the solution.<\/p>\n<p><strong><em>Note:<\/em><\/strong><em> The <strong>\u201cContact Us Personal Web Form\u201d<\/strong> is the form which is used to show the details in the <strong>Contact Us <\/strong>page on the Power Apps portal.<\/em><\/p>\n<p><strong>Step 3:<\/strong> Create few fields such as Age, Gender, Rating and Signature.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-29464\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/1Power-Apps-Portal-ink.jpeg\" alt=\"Power Apps Portal\" width=\"1373\" height=\"892\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/1Power-Apps-Portal-ink.jpeg 1373w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/1Power-Apps-Portal-ink-300x195.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/1Power-Apps-Portal-ink-1024x665.jpeg 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/1Power-Apps-Portal-ink-768x499.jpeg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/1Power-Apps-Portal-ink-660x429.jpeg 660w\" sizes=\"(max-width: 1373px) 100vw, 1373px\" \/><\/p>\n<p><strong>Step 4: <\/strong>Next, open the form which we have added in the solution.<\/p>\n<p>Kindly note, in case you are not able to view the required PCF control from the power platform interface switch to classic interface.<\/p>\n<p>To edit the form in classic interface, click on the <strong>Switch to classic<\/strong> button.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-29463\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/2Power-Apps-Portal-ink.jpeg\" alt=\"Power Apps Portal\" width=\"1053\" height=\"304\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/2Power-Apps-Portal-ink.jpeg 1053w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/2Power-Apps-Portal-ink-300x87.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/2Power-Apps-Portal-ink-1024x296.jpeg 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/2Power-Apps-Portal-ink-768x222.jpeg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/2Power-Apps-Portal-ink-660x191.jpeg 660w\" sizes=\"(max-width: 1053px) 100vw, 1053px\" \/><\/p>\n<p><strong>Step 5:<\/strong> Here we have to set the PCF Controls to each of our field.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-29462\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/3Power-Apps-Portal-ink.jpeg\" alt=\"Power Apps Portal\" width=\"602\" height=\"667\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/3Power-Apps-Portal-ink.jpeg 602w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/3Power-Apps-Portal-ink-271x300.jpeg 271w\" sizes=\"(max-width: 602px) 100vw, 602px\" \/><\/p>\n<p><strong>Step 6: <\/strong>So far, we have set the PCF Control to our Model Driven App.<\/p>\n<p>However, to make it visible in the Power Apps portal follow the steps given below:<\/p>\n<ul>\n<li>Open the Portal Management App and then from the Sitemap open the Basic Forms table.<\/li>\n<li>In the Basic From open the form record on which you want to show the code component. As per our example we will open the <strong>Contact Us Form<\/strong><\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-29461\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/4Power-Apps-Portal-ink.jpeg\" alt=\"Power Apps Portal\" width=\"1012\" height=\"707\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/4Power-Apps-Portal-ink.jpeg 1012w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/4Power-Apps-Portal-ink-300x210.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/4Power-Apps-Portal-ink-768x537.jpeg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/4Power-Apps-Portal-ink-660x461.jpeg 660w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/4Power-Apps-Portal-ink-200x140.jpeg 200w\" sizes=\"(max-width: 1012px) 100vw, 1012px\" \/><\/p>\n<ul>\n<li>After opening the record move to <strong>Basic Form Metadata<\/strong> Tab, and add a new Basic Form Metadata record.<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-29460\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/5Power-Apps-Portal-ink.jpeg\" alt=\"Power Apps Portal\" width=\"1432\" height=\"713\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/5Power-Apps-Portal-ink.jpeg 1432w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/5Power-Apps-Portal-ink-300x149.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/5Power-Apps-Portal-ink-1024x510.jpeg 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/5Power-Apps-Portal-ink-768x382.jpeg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/5Power-Apps-Portal-ink-660x329.jpeg 660w\" sizes=\"(max-width: 1432px) 100vw, 1432px\" \/><\/p>\n<ul>\n<li>Once the new Metadata record form opens set the Metadata type to attribute then select the respective column and then set the control style as Code Components as shown below:<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-29459\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/6Power-Apps-Portal-ink.jpeg\" alt=\"Power Apps Portal-\" width=\"1340\" height=\"718\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/6Power-Apps-Portal-ink.jpeg 1340w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/6Power-Apps-Portal-ink-300x161.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/6Power-Apps-Portal-ink-1024x549.jpeg 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/6Power-Apps-Portal-ink-768x412.jpeg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/6Power-Apps-Portal-ink-660x354.jpeg 660w\" sizes=\"(max-width: 1340px) 100vw, 1340px\" \/><\/p>\n<p>Do this for the all attributes on which you have enabled the PCF Control in CRM and wish to show the same UI in your portal as well.<\/p>\n<p><strong>Step7:<\/strong> Now we are done with the configuration and can proceed to check the result. Move to the Portal, clear the cache and open the <strong>Contact US<\/strong> Form.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-29458\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/7Power-Apps-Portal-ink.jpeg\" alt=\"Power Apps Portal\" width=\"1176\" height=\"848\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/7Power-Apps-Portal-ink.jpeg 1176w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/7Power-Apps-Portal-ink-300x216.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/7Power-Apps-Portal-ink-1024x738.jpeg 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/7Power-Apps-Portal-ink-768x554.jpeg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/7Power-Apps-Portal-ink-660x476.jpeg 660w\" sizes=\"(max-width: 1176px) 100vw, 1176px\" \/><\/p>\n<h3><strong>Conclusion<\/strong><\/h3>\n<p>In this way, with minimum effort you can show the code component in Power Apps portal and enhance the end user experience.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/product\/productivity-apps\/add-manage-schedule-notifications-alerts-4-dynamics-365-crm\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"alignnone size-full wp-image-29466\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/A4D.jpg\" alt=\"Alerts Dynamics 365\" width=\"800\" height=\"200\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/A4D.jpg 800w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/A4D-300x75.jpg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/A4D-768x192.jpg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/09\/A4D-660x165.jpg 660w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Microsoft in the latest release brought many new features in Dynamics 365 CRM which also includes one of the most awaited features &#8211; support of Code Components in Power Apps Portal. In this blog, we will see how we can configure and show a PCF Control in the Power Apps Portal. Kindly note this\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2021\/09\/use-of-code-components-in-power-apps-portal\/\">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":[2053,2763,2361],"tags":[2398],"class_list":["post-29457","post","type-post","status-publish","format-standard","hentry","category-power-apps-portals","category-power-pages","category-technical","tag-powerapps-portal"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/29457","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=29457"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/29457\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=29457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=29457"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=29457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}