Adding custom column in SharePoint List
Hello Guys,
Today we will see how you can create a custom columns in SharePoint List and can display the same columns in Dynamics 365 Document Grid. But before if you are new to our blog then do follow us to know more about Dynamics and Power Platform. Also if you like our blog then please comment and share this blog with your friends.
In our one of the blog i have shown how you can integrate SharePoint in Dynamics 365. If you have not read that blog then you can read it from here.
As you can see we have already created Blogger site in SharePoint. We will be storing all the documents which will be uploaded by CRM Entity. First of all we will understand what is custom columns and why we should use it.
Custom columns in SharePoint List are also known as attributes or components. Consider a scenario where we have Employee Entity. As you can see in below picture we have one Employee record named "Ravish Gupta".
We have uploaded two documents related to this records.
We can see these two documents in SharePoint as well.
Now we want when we update Organization Name for this record then the value of the Organization name should also be stored in SharePoint along with its document. For achieving this we need to create custom attributes in SharePoint List. So first of all we will be creating this attribute.
Navigate to SharePoint site. In the left pane select site contents and select employee folder. You will see below window.
Now click on Add Column -> Single Line of text. Configure it as below.
As you can see Organization column is added.
Now we will be creating one flow which will be triggered when Organization field will be updated. For time being we have created one flow. This will be running on Employee entity when Organization field value will be updated. You can prefer this blog which explains how to update attributes of SharePoint using flow.
As you can see in above record, we have updated organization field value and it is also updated in SharePoint list of this record as shown below.
Now when we will be navigating to document, you will get that Organization field is not visible in Sub-grid of the document. It is because we have created custom column in SharePoint only. We have not created in CRM. So now we will be creating this column in CRM too.
In CRM open the SharePoint Document entity, create fields using the same Display Name as the column name in SharePoint. When selecting the data type choose Single Line of Text for all SharePoint data types except for dates, here you can use the CRM date data type.
This is important because the values are sent to CRM as text in almost all cases when the documents are retrieved and the list component can’t translate the text to the CRM type.
Add this newly added column in Document Associated Grid as shown below.
Save the changes and publish the customization. Now refresh the Employee record and navigate to document.
Hope it helps...
Comments
Post a Comment