While adding Tabs, Sections & Fields is fairly straight forward in Dynamics 365 CRM, showing the “Documents” tab which is accessible from Related section isn’t.
So, here’s how to do it when you need to.
Exporting customizations.xml with Form
Here’s what you need to first do in order to setup the Documents folder on the main form –
- Assuming “Docs” is the name of the tab you want to place your SharePoint library in. Add any field for reference which is not used on the form elsewhere. In my case, I’m choosing Address 2: Latitude for easy identification.

- Then, make sure you add the Form in a solution and export the solution.

And then export it –
And choose it to be Unmanaged to avoid any hassles in case you need to continue customizing this table further
- Then, extract the solution folder itself and open customizations.xml.
Now when you extract the same, find the Docs tab and locate the Control you added.
- Now, copy the below code and replace it with the <control> which is highlighted in the screenshot above.
<control id="DocumentSubGrid" classid="{E7A81278-8635-4d9e-8D4D-59480B391C5B}" indicationOfSubgrid="true" uniqueid="{9cd66b5c-8b7a-6433-c5a5-46a7245dd534}">
<parameters>
<ViewId>{0016F9F3-41CC-4276-9D11-04308D15858D}</ViewId>
<IsUserView>false</IsUserView>
<RelationshipName>Account_SharepointDocument</RelationshipName>
<TargetEntityType>sharepointdocument</TargetEntityType>
<AutoExpand>Fixed</AutoExpand>
<EnableQuickFind>false</EnableQuickFind>
<EnableViewPicker>true</EnableViewPicker>
<ViewIds />
<EnableJumpBar>false</EnableJumpBar>
<ChartGridMode>Grid</ChartGridMode>
<VisualizationId />
<IsUserChart>false</IsUserChart>
<EnableChartPicker>false</EnableChartPicker>
<RecordsPerPage>10</RecordsPerPage>
<HeaderColorCode>#F3F3F3</HeaderColorCode>
</parameters>
</control>
And paste it in the customizations.xml file where you had the control added.
- Now, create a new GUID, you can do so online easily.

- Replace this GUID to the uniqueid parameter of the DocumentSubGrid control.

- Also, make sure the table which you are enabling this Document tab on the main form – has the correct SharePoint Document relationship entered. In this case, I’m keeping Account, so the RelationshipName is as below –

And it’s as below –
- Now, save the file. Rebundle into a new zip file and import the solution again.
- When you refresh the Form, you’ll see that the Documents tab is now on the main form.

Here are some Power Automate posts you want to check out –
- Select the item based on a key value using Filter Array in Power Automate
- Select values from an array using Select action in a Power Automate Flow
- Blocking Attachment Extensions in Dynamics 365 CRM
- Upgrade Dataverse for Teams Environment to Dataverse Environment
- Showing Sandbox or Non Production Apps in Power App mobile app
- Create a Power Apps Per User Plan Trial | Dataverse environment
- Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
- Co-presence in Power Automate | Multiple users working on a Flow
- Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
- Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
- Call a Flow from Canvas Power App and get back response | Power Platform
- FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
- Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
- Asynchronous HTTP Response from a Flow | Power Automate
- Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
- Converting JSON to XML and XML to JSON in a Flow | Power Automate
Thank you!