Setup Document Management Settings

This post is part of the SharePoint series.


Document Management Settings

In the previous post we have activated the Out of the box Server-Based SharePoint Online Integration. As mentioned, there are some decisions that you should take, before continuing to decide if the default behavior is suitable for your process or if you need a custom setup.

  1. In this post we will cover the default behavior by using the Document Management Settings to configure the Sharepoint Integration
  2. In the first page of the dialog, some tables (entities) are already predefined for SharePoint Integration, but you can deactivate and activate the tables in the list, just by adding or removing the checkmark next to the entity. Before you move on, make sure, that your SharePoint site that you have enabled is entered at the bottom of the page. Otherwise re-enter the SharePoint Site URL that you have activated in the first post.
  3. When activating the Document Management in the Dataverse Backend, you have limited options to decide how the SharePoint folders will be created. There are basically three choices for the folder structure available in the next screen:
  • Empty (Default): In this case, for each table that is activated for SharePoint, a document library will be created in your default SharePoint Site, with the name of the table - by default e.g., Account would be enabled and you will find an Account library on your SharePoint and if you activete Contacts you will have a Contact Document library on the same level as the Account. For the next two options, you have to activate based on entity (table) and choose one of the options
  • Account If you choose Account, you will find a basic folder hierarchy on SharePoint. The Account folder will be on the 1st level and e.g., for Contacts a Contact folder would be created in the respective Account folder. Then all related contacts would be inside this Contact folder. If you acrivate other tables that are related to the contact, these folders would be on the same level as Contact and all related records in the level below. For tables that does not have a relationship to Account, these Document libraries would be still created on the same level Account.

SharePoint Root

  • Account

    • Demo Account
      • Contact
        • First Contact of Demo Account
        • Second Contact of Demo Account
    • Test Account
      • Contact
      • Knowledge Article
  • Contact
    If you choose Contact, the behavior would be the same, except that the Folder hierarchy starts with the Contact Document library and related tables would be created within the respective Contact as folder.

These are basically the options that you can specify when setting up the document management. Select the tables that should be activated for the SharePoint integration and decide if there is a basic folder hierarchy. There is no option to select a different table as starting point than Account or Contact by default.

  1. The document libraries will be created directly on SharePoint. But when are the record specific folders created? These folders will be created, when the document tab on the specific record is opened for the first time. So if you do not open the specific tab - nothing will be created on SharePoint. In addition, each folder that will be created, is based on a concatination of the ’name column’ &"_"& ‘GUID’ of the respective record. Therefore the folder names on SharePoint are Unique but not easy to read.

After creating some records in Dataverse and making sure that the respective Sharepoint folders have been created as well, you can open the Document Management in Advanced Settings again. This time we will have a look at the option SharePoint Document location. Once you have clicked on this option you will see a list of “My Active Document locations”. In this list, you will find all information about the Datavaerse records that you have opened the Document tab, with a record Name, Regarding column, Parent Site or Location as well as the Relative URL. The regarding value is referring to the Dataverse record and the Relative URL is the folder path to the respective folder in SharePoint. Based on the Parent Site or Location entry the hierarchy on SharePoint is build.

Once you have realized and understood what is happening in the backend, you might understand what is coming in the next post, when we will focus on creating a custom Folder hierarchy in SharePoint.

Some limitations: Creation of SharePoint folders is only triggered once.

  • If you change the name of a reocrd with a SharePoint location, the name will remain the old one in SharePoint. No update of the folder name. The link will nevertheless continue to work, as the regarding object is still in place and maintains the relationship between the old and new name.
  • When you change the parent account of a contact in our example above, where the hierarchy is Based on account entity, the Sharepoint connection will break. The original hierarchy will be removed, but a new one is not created out of the box.

All parts of this series (21)

  1. 10. Custom SharePoint Integration with Dataverse
  2. 13. Setup Document Management Settings
  3. 16. Enable Default SharePoint Integration in Dynamics 365 CE