{"id":37915,"date":"2025-05-31T22:18:50","date_gmt":"2025-05-31T16:48:50","guid":{"rendered":"https:\/\/techmasala.addastudents.com\/dev\/?p=37915"},"modified":"2025-06-11T22:13:32","modified_gmt":"2025-06-11T16:43:32","slug":"how-to-embed-a-main-form-in-dynamics-365-crm-using-form-component-control","status":"publish","type":"post","link":"https:\/\/techmasala.addastudents.com\/dev\/how-to-embed-a-main-form-in-dynamics-365-crm-using-form-component-control\/","title":{"rendered":"How to Embed a Main Form in Dynamics 365 CRM Using Form Component Control"},"content":{"rendered":"\n<p>As a Dynamics 365 CRM developer, you might need to show data from one entity directly inside another entity\u2019s form. For example, imagine you want to display a Contact\u2019s details (like name, email, and phone) right on an Account\u2019s main form, so users can view or edit them without switching screens. This is where the <strong>Form Component Control<\/strong> comes in handy. It lets you embed a related entity\u2019s main form into another entity\u2019s main form in a clean, user-friendly way.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is the Form Component Control?<\/h2>\n\n\n\n<p>The <strong>Form Component Control<\/strong> is a feature in Dynamics 365 that lets you display a related entity\u2019s <strong>main form<\/strong> (like Contact) inside another entity\u2019s main form (like Account). It\u2019s tied to a <strong>lookup field<\/strong> and allows users to <strong>view and edit fields<\/strong> directly on the same screen. This saves time and improves the user experience.<\/p>\n\n\n\n<p><strong>Example:<\/strong> If an Account has a <strong>Primary Contact<\/strong> lookup field, you can use the Form Component Control to show the Contact\u2019s main form (with fields like First Name, Email, etc.) right on the Account form.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Use It?<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Convenience:<\/strong> View and edit related data without navigating away.<\/li>\n\n\n\n<li><strong>Efficiency:<\/strong> Reduces clicks and context switching.<\/li>\n\n\n\n<li><strong>Flexibility:<\/strong> Works across web, tablet, and phone interfaces in Dynamics 365.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p>Make sure you have:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>System Administrator<\/strong> or <strong>System Customizer<\/strong> permissions.<\/li>\n\n\n\n<li>A <strong>lookup field<\/strong> linking the two entities (e.g., \u201cPrimary Contact\u201d on Account pointing to Contact).<\/li>\n\n\n\n<li>The <strong>Form ID<\/strong> of the Contact\u2019s main form (don\u2019t worry, I\u2019ll show you how to find it).<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step-by-Step Guide: Embed a Contact\u2019s Main Form in an Account\u2019s Main Form<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Open the Form Editor<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to <strong>make.powerapps.com<\/strong>.<\/li>\n\n\n\n<li>Open your solution &gt; Expand <strong>Tables (Entities)<\/strong> &gt; Select <strong>Account<\/strong> &gt; Click on <strong>Forms<\/strong>.<\/li>\n\n\n\n<li>Open the <strong>Account Main Form<\/strong>.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Add a Tab and Section<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In the form editor, go to the <strong>Insert<\/strong> tab.<\/li>\n\n\n\n<li>Add a new <strong>One Column Tab<\/strong>, or use an existing one (like &#8220;General&#8221;).<\/li>\n\n\n\n<li>Inside the tab, add a <strong>Section<\/strong>, and name it something like <strong>&#8220;Contact Details&#8221;<\/strong>.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Add the Lookup Field<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ensure the <strong>Primary Contact<\/strong> lookup field is present.<\/li>\n\n\n\n<li>If not:\n<ul class=\"wp-block-list\">\n<li>Open <strong>Field Explorer<\/strong>.<\/li>\n\n\n\n<li>Find or create the <strong>Primary Contact<\/strong> field (a lookup to Contact).<\/li>\n\n\n\n<li>Drag it into the \u201cContact Details\u201d section.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>This lookup field is critical\u2014it tells the Form Component Control which Contact record to display.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Add the Form Component Control<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Click the <strong>Primary Contact<\/strong> field.<\/li>\n\n\n\n<li>In the ribbon, click <strong>Change Properties<\/strong>.<\/li>\n\n\n\n<li>Go to the <strong>Controls<\/strong> tab.<\/li>\n\n\n\n<li>Click <strong>Add Control<\/strong> &gt; Select <strong>Form Component Control<\/strong> &gt; Click <strong>Add<\/strong>.<\/li>\n\n\n\n<li>Enable the control for <strong>Web<\/strong>, <strong>Tablet<\/strong>, and <strong>Phone<\/strong>.<\/li>\n\n\n\n<li>Select Edit (pencil icon) and on the Configure Property dialog box select Bind to a static value and then add an XML entry similar to this where TableName is the table unique name and FormID is the form ID for the main form:<br><br>&lt;QuickForms>&lt;QuickFormIds>&lt;QuickFormId entityname=&#8221;TableName&#8221;>FormID&lt;\/QuickFormId>&lt;\/QuickFormIds>&lt;\/QuickForms><br><br>For example, to render the Contact main form on the account form, use:<br><br>&lt;QuickForms>&lt;QuickFormIds>&lt;QuickFormId entityname=&#8221;contact&#8221;>1fed44d1-ae68-4a41-bd2b-f13acac4acfa&lt;\/QuickFormId>&lt;\/QuickFormIds>&lt;\/QuickForms><\/li>\n<\/ol>\n\n\n\n<p><strong>How to find the Contact Form ID:<\/strong><\/p>\n\n\n\n<p class=\"has-small-font-size\">To find the unique name for a table, select the table in Power Apps and then select\u00a0<strong>Settings<\/strong>. The\u00a0<strong>Name<\/strong>\u00a0appears on the\u00a0<strong>Edit<\/strong>\u00a0table pane. The form ID can be found in the browser URL when you edit a form. The ID follows the\u00a0<strong>\/edit\/<\/strong>\u00a0portion of the URL.\u00a0<br><br><img decoding=\"async\" src=\"https:\/\/learn.microsoft.com\/en-us\/power-apps\/maker\/model-driven-apps\/media\/form-component-formid.png\" alt=\"Form ID can be found in the browser URL when you open a form in the modern form designer.\"><\/p>\n\n\n\n<p>In the classic form designer, the form ID follows the&nbsp;<strong>formId%3d<\/strong>&nbsp;portion of the URL.<\/p>\n\n\n\n<ol start=\"7\" class=\"wp-block-list\">\n<li>Click <strong>OK<\/strong> to close and save.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Adjust the Layout<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Select the <strong>Contact Details<\/strong> section.<\/li>\n\n\n\n<li>In the <strong>Formatting<\/strong> tab, increase the height and width to fit the embedded form properly.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step 6: Save and Publish<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click <strong>Save<\/strong> in the form editor.<\/li>\n\n\n\n<li>Click <strong>Publish<\/strong>.<\/li>\n\n\n\n<li>If you added or edited fields, go to your solution and click <strong>Publish All Customizations<\/strong>.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step 7: Test the Form<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open an <strong>Account<\/strong> record.<\/li>\n\n\n\n<li>Select a <strong>Contact<\/strong> in the Primary Contact field.<\/li>\n\n\n\n<li>You should now see the <strong>Contact\u2019s main form<\/strong> embedded in the \u201cContact Details\u201d section.<\/li>\n\n\n\n<li>Edit fields (like email) and save the Account to verify it works.<\/li>\n<\/ul>\n\n\n\n<p>\u2705 Test on <strong>web<\/strong>, <strong>tablet<\/strong>, and <strong>mobile<\/strong> to ensure proper rendering.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Example: Embedding Contact Form in Account Form<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"622\" src=\"https:\/\/techmasala.addastudents.com\/dev\/wp-content\/uploads\/2025\/05\/image-1024x622.png\" alt=\"\" class=\"wp-image-37919\" srcset=\"https:\/\/techmasala.addastudents.com\/dev\/wp-content\/uploads\/2025\/05\/image-1024x622.png 1024w, https:\/\/techmasala.addastudents.com\/dev\/wp-content\/uploads\/2025\/05\/image-300x182.png 300w, https:\/\/techmasala.addastudents.com\/dev\/wp-content\/uploads\/2025\/05\/image-768x467.png 768w, https:\/\/techmasala.addastudents.com\/dev\/wp-content\/uploads\/2025\/05\/image.png 1042w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Say you\u2019re building a CRM system for a company that manages Accounts and their Primary Contacts. You want users to see\/edit Contact fields (like First Name, Email, and Phone) directly from the Account form.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Setup:<\/strong> Add the <strong>Primary Contact<\/strong> lookup field to a new section on the Account form called \u201cContact Details.\u201d<\/li>\n\n\n\n<li><strong>Control:<\/strong> Link the field with the <strong>Form Component Control<\/strong>, and configure it using the Contact\u2019s <strong>main form ID<\/strong>.<\/li>\n\n\n\n<li><strong>Result:<\/strong> When a user selects a Contact (e.g., \u201cJohn Doe\u201d), the Contact\u2019s form appears right in the Account form. The user can edit John\u2019s details without leaving the screen.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Tips for Success<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Correct Form ID:<\/strong> A wrong Form ID means nothing will display. Always double-check.<\/li>\n\n\n\n<li><strong>Security Roles:<\/strong> Ensure users have <strong>read\/write access<\/strong> to both entities.<\/li>\n\n\n\n<li><strong>Performance:<\/strong> Avoid embedding overly complex forms. Simplify if the Account form becomes sluggish.<\/li>\n\n\n\n<li><strong>Unified Interface:<\/strong> The control works best in the modern <strong>Unified Interface<\/strong>.<\/li>\n\n\n\n<li><strong>Troubleshooting:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Ensure a valid Contact is selected in the lookup field.<\/li>\n\n\n\n<li>Check that you\u2019ve published changes.<\/li>\n\n\n\n<li>Confirm the Form ID matches the actual main form.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Why Not Other Methods?<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Sub-Grids:<\/strong> Great for listing multiple records, but not for editing a single record inline.<\/li>\n\n\n\n<li><strong>Quick Create Forms:<\/strong> Good for new entries, but not for viewing\/editing full records.<\/li>\n\n\n\n<li><strong>Form Component Control:<\/strong> The <strong>only option<\/strong> that lets you embed a full editable main form inside another.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p>The <strong>Form Component Control<\/strong> is a powerful way to embed one entity\u2019s form into another, enhancing user experience and productivity. With just a lookup and a few steps, you can give your users the ability to view and edit related data without switching screens.<\/p>\n\n\n\n<p>Set it up, test it thoroughly, and give your users a seamless CRM experience they\u2019ll appreciate.<\/p>\n\n\n\n<p>\ud83d\udc49 For more info, check out Microsoft\u2019s official documentation: <a href=\"https:\/\/learn.microsoft.com\/en-us\/power-apps\/maker\/model-driven-apps\/form-component-control\" target=\"_blank\" rel=\"noopener\">Form <\/a><a href=\"https:\/\/learn.microsoft.com\/en-us\/power-apps\/maker\/model-driven-apps\/form-component-control\" target=\"_blank\" rel=\"noreferrer noopener\">Component<\/a><a href=\"https:\/\/learn.microsoft.com\/en-us\/power-apps\/maker\/model-driven-apps\/form-component-control\" target=\"_blank\" rel=\"noopener\"> Control | Learn<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>As a Dynamics 365 CRM developer, you might need to show data from one entity directly inside another entity\u2019s form. For example, imagine you want to display a Contact\u2019s details (like name, email, and phone) right on an Account\u2019s main form, so users can view or edit them without switching screens. This is where the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":37923,"comment_status":"open","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"footnotes":""},"categories":[70,17,72],"tags":[969,973,971,972,970],"class_list":["post-37915","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-learn-technology-free","category-learn-microsoft-dynamics-crm","category-tech","tag-365-crm","tag-dynamics-2","tag-embedding","tag-form-component","tag-main-form"],"_links":{"self":[{"href":"https:\/\/techmasala.addastudents.com\/dev\/wp-json\/wp\/v2\/posts\/37915","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techmasala.addastudents.com\/dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techmasala.addastudents.com\/dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techmasala.addastudents.com\/dev\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techmasala.addastudents.com\/dev\/wp-json\/wp\/v2\/comments?post=37915"}],"version-history":[{"count":4,"href":"https:\/\/techmasala.addastudents.com\/dev\/wp-json\/wp\/v2\/posts\/37915\/revisions"}],"predecessor-version":[{"id":37926,"href":"https:\/\/techmasala.addastudents.com\/dev\/wp-json\/wp\/v2\/posts\/37915\/revisions\/37926"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techmasala.addastudents.com\/dev\/wp-json\/wp\/v2\/media\/37923"}],"wp:attachment":[{"href":"https:\/\/techmasala.addastudents.com\/dev\/wp-json\/wp\/v2\/media?parent=37915"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techmasala.addastudents.com\/dev\/wp-json\/wp\/v2\/categories?post=37915"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techmasala.addastudents.com\/dev\/wp-json\/wp\/v2\/tags?post=37915"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}