How to Add Metadata to SharePoint Document Subgrid in Dynamics 365

As mentioned in the Dynamics CRM Tip Of The Day Tip #1185, you can customise the SharePoint document subgrid for server-side integration. At the time of publishing that post, the view was not customisable via solution explorer yet but in this forum answer, the Document Associated Grid of the SharePoint Document entity can now be editable via solution explorer.
 

Default Document Subgrid

These are the list of columns that you can add to the default Document Associated Grid of Model-driven Apps in Dynamics 365.
SharePoint document columns


But what if you want to add another SharePoint column that is not available in the list? (e.g. Version of the document)
What if you have created a new custom column in the SharePoint library and you want to show that that in the documents subgrid?

The good news is that you can show those columns by adding a new field to the Sharepoint Document entity. I got this tip from one of my colleagues, Chadi, who shared with me how he added the Version column to the SharePoint document subgrid.

In the following sample SharePoint library, I have added the Version column and two other custom columns. One of the custom columns is a Single line of text column and the other one is of Number data type.
Sharepoint Columns

To add these columns to the SharePoint document subgrid, create a new field in the Sharepoint Document entity with the same Display name and add it to the Document Associated Grid view.
New Field for Document


🛈 Important 

The Display Name of the new field needs to be exactly the same as the column name in the SharePoint library. The logical name or prefix of the field can be anything. The Data Type of the fields needs to match with the SharePoint column data type.

This is the final result of the SharePoint document subgrid after adding two Text fields (Custom Column & Version) and one Whole Number field (Custom Number).

Document Subgrid with Custom Columns

Comments

  1. Hi Linn,
    thank you for the hint.
    You write the displayname in CDS must be the same as the column name in Sharepoint to get it working.
    Question:
    What if my environment is used in different UI languages? Will it only work for the base language?

    cheers Lars

    ReplyDelete

Post a comment

Popular Posts

[Power Automate] How to Set Lookup Field Value in Common Data Service (current environment) Flow Connector

Access Flow Run History within a Record in Dynamics 365/CDS

[Power Automate] List Records - Use Expand Query to Retrieve Related Data in flow

[Power Apps] Using Common Data Service's Lookup Data Type Field in Canvas App

Find out how to include a link to the record (Record URL) when sending an email from Dynamics 365/CDS using flow

Script Errors Encountered after Field Service Upgrade to 8.x

Pass Parameters to Quick Create Form in Dynamics 365 using formContext.data.attributes

[Bug] Using the ClearCollect() Function in PowerApps does not Pull any Lookup Columns from Common Data Service (CDS) Data Source

Getting the Lookup Attribute of the Parent Record in Power Apps Canvas App Development with Common Data Service (CDS)

Send Email from Dynamics 365/CDS with Attachment from Notes Using Flow