In this blog we’ll cover the steps to add the SharePoint Grid on the main form itself.
Currently, the user has to navigate to ‘Related’ and then click on ‘Documents’ to open the SharePoint Documents.
Follow the steps given below to add the SharePoint grid on the main form:
- Create new solution
- Add the Table(entity) for which you want to add the SharePoint grid


- Include the form on which you want to add the SharePoint grid

- Once you are done creating the solution customize the main form as below.
Editing the Main Form:
- Add the Section or Tab as per your requirement.
- I have added 1-Column section

- Give an appropriate Name to your section

- Add any text or numeric column(field) in the section. I have added a “Name” Column.

- Once you are done, save and Publish your customization.

Export the solution
- Export your solution as ‘Unmanaged’

- Once your solution is exported successfully, extract the solution
Extracting the solution:
- Right click on the solution and click on Extract All.. to extract the solution

- Once your solution is extracted, open the “customizations” file with an XML or text editor. (I am using Notepad++)

- Search for label description=”Files” (or whatever you named the section label in form customizations)
- Scroll down to the control id=”field name” element, such as control id=”vv_name”, we have to replace that with an XML sample in step number 5

- Copy the XML sample given below and make two changes in XML as shown.
- Generate a random GUID and replace it with the guid in “uniqueid”( Free Online GUID Generator: https://www.guidgenerator.com/online-guid-generator.aspx )

- Replace the RelationshipName with your“entityLogicalName_SharePointDocument”. You can find the relationship name under the Relationship tabs in solution.


XML:
<control id="DocumentSubGrid" classid="{E7A81278-8635-4d9e-8D4D-59480B391C5B}" indicationOfSubgrid="true" uniqueid="{9b41f697-e380-4a50-94f6-abfcbc1ff7fd}">
<parameters>
<ViewId>{0016F9F3-41CC-4276-9D11-04308D15858D}</ViewId>
<IsUserView>false</IsUserView>
<RelationshipName>vv_demo_SharePointDocuments</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>
- Comment or replace the existing control for the text column(field) and add the newly created XML control.
As you can see in the Screenshot given below, I have commented the existing control and added the new XML control for the SharePoint Grid.

- Save the file once you are done
- Package all solution files into a compressed (zipped) folder and import in to your environment
- To package all the files, Select All the files and click on Send to –> Compressed(zipped) folder

- You can see a zip folder has been created. (I have renamed my zip folder to the solution name)

- Once your ZIP folder is created successfully, import that into your environment


- Once your solution is imported successfully, Open the solution and click on “Publish all customizations”

Open the Entity Form. You’ll see the SharePoint Grid on the Main form.


