Skip to content

Add SharePoint Documents tab on the Main form in D365 CE(CRM)

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:

  1. Create new solution
  1. Add the Table(entity) for which you want to add the SharePoint grid
  1. Include the form on which you want to add the SharePoint grid
  1. Once you are done creating the solution customize the main form as below.

Editing the Main Form:

  1. Add the Section or Tab as per your requirement.
  2. I have added 1-Column section
  1. Give an appropriate Name to your section
  1. Add any text or numeric column(field) in the section. I have added a “Name” Column.
  1. Once you are done, save and Publish your customization.

Export the solution

  1. Export your solution as ‘Unmanaged’
  1. Once your solution is exported successfully, extract the solution

Extracting the solution:

  1. Right click on the solution and click on Extract All.. to extract the solution
  1. Once your solution is extracted, open the “customizations” file with an XML or text editor. (I am using Notepad++)
  1. Search for label description=”Files” (or whatever you named the section label in form customizations)
  2. 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
  1. Copy the XML sample given below and make two changes in XML as shown.
  • Replace the RelationshipName with your“entityLogicalName_SharePointDocument”. You can find the relationship name under the Relationship tabs in solution.
This image has an empty alt attribute; its file name is image-156-1024x184.png

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>
  1. 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.

  1. Save the file once you are done
  1. 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.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments