Dynamics 365 Portals New Feature - Manage SharePoint Documents

Satyvir Jasra, 09 July 2019

In Dynamics 365, we can utilise the ‘Document Management’ functionality to upload documents for different entity records. For example, I can upload and/or view them for a Contact record.

image

However, this functionality wasn’t available for the Dynamics 365 Portals until the 2018 October release. In this blog, I will step through how to setup Document Management for Contact records in the Portal. I already have a web page on the portal which uses the web-form to show the details of a Contact through ‘Contestant Details Form’.

image

Set up SharePoint Integration

Feel free to read the documentation about configuring Document Management for Dynamics 365 if you haven’t setup this functionality already. Assuming that you have done that, following are the steps to setup the SharePoint integration on the Dynamics 365 Admin Centre.

Firstly, we will need to Once logged into the Dynamics 365 Admin Centre, click on ‘Applications’ tab, then select the configured portal and then click on ‘Manage’.

image

  1. Then click on ‘Enable SharePoint’ integration.

    image
  2. It is possible that you will see a message like this below telling you why the integration couldn’t finish. In such case, you will need follow the instructions to provide consent to the changes being made to the Azure Active directory application.

    image
  3. Note, it will take a few minutes for the setup to be completed and the Portal will potentially be unavailable. Once, the setup is done, we are ready to make further changes in Dynamics 365 instance.

    image

Making Changes in Dynamics 365

Next, we’ll go through the changes that need to be made in the Dynamics 365 instance which is linked to the Portal.

  1. We will need to customize the form that is being used on the Portal, in my case I will be editing the ‘Contestant Details’ Form for the Contact entity. First we’ll add a sub-grid on the form, for the ‘Document Locations’ entity. Once the sub-grid has been added, save the changes and publish them.

    image
  2. Create a new ‘Entity Permission’ record (this can be found under the Portals area in Dynamics 365), set the scope to ‘Parent’ and in my case ‘Parent Entity Permission’ had to be ‘Contact’. But this can differ based on your requirements.  Tick the privileges that a logged in Portal User should have.

    image
  3. Once the Entity Permission has been created, it is now ready to be associated to ‘Web Roles’ records. In my case, I wanted to grant this entity permission to the ‘Administrators’ web role.

    image

See the Functionality in Action

For testing purpose, I opened the same contact record on the Portal that I opened earlier. I logged in with a Portal User which had the ‘Administrators’ web role. I was able to see the newly added ‘Documents’ sub-gird which let me view the documents already uploaded for this record.

image

By clicking on the ‘Add files’ button, I was able to upload new documents for the Contact record from Portal.

image