How to edit a parent record from Child record form in Dynamics 365/ Dataverse?

Microsoft is releasing updates to Power platform every quarter and honestly it’s so tough to keep track of the numerous enhancements that are pushed on to the platform. But the one thing that caught my eye and perhaps didn’t gain much publicity is the introduction of Form component control.

So it’s another control in Microsoft suite of numerous custom controls. But wait, did you know that using this you can edit a parent record from child entity form? Well I guess I have your attention now. So let’s explore it together.

We are pretty much aware of Quick view forms in Dynamics 365/ CDS which allow a user to view the parent record details from a child form. But it lacked one stuff. The capability to edit the parent record details from child form.

Below is a Quick view form in action where the details of Primary contact are displayed on the account form. While the details are displayed, the details are not editable.

editable quick view control in Dynamics 365/ Dataverse

Form component control bridge that gap and allow you to the edit the details of the parent record from child form. Let’s see how we can do that.

The first and foremost thing we need to remember is only forms of type Main are supported. I go ahead and create a new form for contact entity of type Main. I will keep the following fields on the form.

editable quick view control in Dynamics 365/ Dataverse

Put a few fields inside one tab which are displayed here. Remember only first tab will displayed even if you have multiple tabs on the form.

After that it’s pretty simple. Open the account form and select the lookup control for which you want to display the ‘Form component control’. In our case it is primarycontactid. Select the control and click on Change properties.

Select Form Component control from the list of controls.

editable quick view control in Dynamics 365/ Dataverse

Use the ‘Bind to a static value’ option.

editable quick view control in Dynamics 365/ Dataverse

Copy and paste the below XML in the static value text.

<QuickForms><QuickFormIds><QuickFormId entityname="contact">CAE6457D-9458-EB11-A812-000D3A8C6E36</QuickFormId></QuickFormIds></QuickForms>

I have highlighted in bold the parts that you need to replace. Entityname is quite simple. The GUID here is the GUID of the main form we just created. Remember the QuckFormId does not mean the QuickViewForm. You should put the GUID of the main form we created.

Save and publish the form. Below is the behavior when I select the contact in Primary contact field.

editable quick view control in Dynamics 365/ Dataverse

As you can see the fields on the contact form are editable while I am on the Account form. Wonderful, isn’t it?

You may also like the below posts

Hope this helped!

Debajit Dutta
Business Solutions MVP