Introducing Form Component Control in Dynamics 365 / Power Apps
Summary
The form component control in Dynamics 365 and Power Apps lets users embed a main form from one entity into a form of another entity. This feature makes it easy to see related data in a single form. However, there are some limitations and best practices for form component control, such as avoiding using quick view, quick create, and card forms, and avoiding using it with business process flows. Also, users have to ensure that each table has a fallback form and to give security roles to forms to control access based on user wants. By learning these key points and considerations, users can leverage the form component control effectively to enhance the user interface and data interaction in Dynamics 365 and Power Apps.
Key Benefits:
Users can update parent records smoothly through the embedded child record form with the Form Component Control. This feature enhances data interaction and the user experience by avoiding the need to use separate forms for data management. For instance, the feature enables users to edit a contact record in the account form, without switching between forms.
How about we look at how to add a contact record to the Account form?
Create a new main form for the Contact Table:
Add Contact table form to the parent (Account table) table:
You need to attach the form to the parent table next. The parent table has the lookup field that shows up on the form. This lookup field shows how the tables are related. For example, the Primary Contact field shows the 1 (Contact) to Many (Accounts) relationship between the contact and account tables, where the account is the parent table. Go to https://make.powerapps.com/. Expand ‘Data’ on the left, then choose ‘Tables’ and open the account table. Click on the ‘Forms’ tab at the top and open the form where you want to see the contact details.
At present, it is not possible to include this control in the new experience. Therefore, you should select the 'Switch to classic' button on the command bar to access the classic form designer. Once the form is loaded in the classic designer, choose the lookup field for which you want to display the information and link the form created in the previous step. For instance, this could be the primary contact field in our scenario.
Within the field properties window, navigate to the controls tab and select 'Add control'. Locate the 'Form Control Component' in the list and click 'Add'. Here, you can specify where this control should be added, whether on the web, phone, or tablet. In the form component control section below, you will observe that the 'Lookup Value' property has been populated with the system name of the lookup field (Primary contact). Click on the pencil icon next to 'Forms' to specify the form you wish to display here, which is the form created earlier. Under 'Bind to a static value', you will need to choose 'SingleLine.Text'. Then, in the adjacent field, you will need to input the following text, making necessary updates to:
<QuickForms><QuickFormIds><QuickFormId entityname="TableName">FormID</QuickFormId></QuickFormIds></QuickForms>
You need to use the real table name instead of “TableName” and the form ID instead of FormID in the text above. To find the table names, go to the tables in make.powerapps.com and look at the name field. This field shows the system name fields for each table, which is what we have to use. To find the form ID, open the form. The form ID is in the URL after the edit part and before the ‘?’ in the url.
Select OK, and then select OK again.
Save and then Publish your form.
Now you can browse the account form and find the contact information related to the account in the contact tab as shown below:
Back to Blog