Document Management with SharePoint Integration

Document Management with SharePoint Integration

Many organizations struggle with the inefficiencies of managing complex relational data and documents across multiple applications. Users often find themselves switching between Dataverse for data management and various tools for document handling, leading to fragmented workflows and decreased productivity. They need a solution that centralizes these tasks to streamline their operations and enhance collaboration.

This is where the integration of Microsoft Dataverse with SharePoint comes into play. Dataverse is exceptional for managing relational data, while SharePoint excels in secure document management and collaboration. By combining these platforms, users can access and manage documents directly within their Dataverse records, creating a seamless workflow that eliminates the need for constant app-switching.

Power Automate further enhances this integration by automating workflows, ensuring that data and documents remain synchronized and up-to-date without manual intervention. This not only saves time but also minimizes errors, making processes more efficient and reliable.

Let’s break down what these tools and integrations mean for your business:

  • Why You Should Care: Centralizing data and document management reduces the need to switch between applications, enhancing productivity and collaboration.
  • How It Works: Easily set up integration through the Power Platform admin center to manage documents within Dataverse records.
  • Taking It to the Next Level: Leverage advanced features like Document Sets and metadata synchronization to keep data consistent and up-to-date.

In summary, the integration of Dataverse and SharePoint, powered by Power Automate, revolutionizes how users handle data and documents. It’s a game-changer for optimizing operations and boosting efficiency

Why You Should Care

Unlocking the full potential of data and document management is crucial in today’s fast-paced business environment. Microsoft Dataverse offers robust capabilities for managing relational data, while SharePoint excels in document management. Understanding how these tools complement each other can significantly enhance your organization’s productivity and collaboration.

Dataverse’s Strengths

Dataverse is a robust platform designed to handle relational data efficiently. It provides a structured environment where you can manage, store, and secure data across various applications within the Microsoft ecosystem, particularly useful in Dynamics 365 applications like Sales, Customer Service, and Marketing. Dataverse supports complex data types and offers rich relational data management capabilities, making it a powerful tool for managing structured business data. According to Microsoft, Dataverse “enables users to securely store and manage data used by business applications”​

Furthermore, Dataverse is designed to handle complex data models and relationships, making it suitable for applications that require a high degree of data integrity and security. Its integration with the Microsoft Power Platform allows users to create, automate, and analyze data seamlessly, enhancing business processes and decision-making capabilities.

Benefits of SharePoint

SharePoint complements Dataverse by providing a comprehensive suite of document management features. SharePoint allows for the storage, organization, sharing, and management of documents within the context of Dataverse records. Key benefits of SharePoint integration include:

  • Seamless Document Storage: Documents can be stored directly on a SharePoint server, making them accessible to users with appropriate permissions even if they aren’t running the Dataverse app. According to Microsoft, “SharePoint stores documents on a SharePoint Server, and users who aren’t running the app can directly access documents on the SharePoint Server”.
  • Single Sign-On: Users can access documents without needing to sign in separately to SharePoint, simplifying the user experience. This feature enhances user convenience and streamlines access to necessary documents.
  • Robust Document Actions: SharePoint actions, such as document approvals and version control, can be performed directly from the Dataverse interface. These actions are essential for maintaining document integrity and ensuring that all changes are tracked and managed effectively.


Streamlined Document Management

Integrating SharePoint with Microsoft Dataverse creates a robust document management system within model-driven apps, significantly enhancing both data handling and document accessibility. By integrating SharePoint, documents are stored on a secure server and linked directly to relevant Dataverse records. This setup allows users to access and manage documents within the app interface, streamlining workflows and reducing the need to toggle between systems.

How It Works

Many community experts and MVPs have pointed out that it is extremely important to properly configure the SharePoint integration. Misconfiguration can cause inefficiencies and security risks, making best practices vital. We have put together a comprehensive guide with detailed instructions and expert advice to help you set up the integration for your own projects.

Step-by-Step Integration Instructions

1. Access Power Platform Admin Center

  1. Navigate to the Power Platform Admin Center: Click on the gear symbol on the right-hand side of the Power Platform home page.
  2. Ensure you have system administrator or system customizer privileges: These privileges are required to configure the integration​

2. Enable SharePoint Integration

  1. Go to Settings > Document Management: Within the Power Platform Admin Center, navigate to Settings and then Document Management.
  2. Select SharePoint Integration and choose Enable: Click on Enable to start the configuration process.
  3. Configure the integration:
    • Specify the SharePoint site collection: Enter the URL of your SharePoint site collection.
    • Set up authentication via Microsoft Entra ID: Follow the prompts to set up authentication. This ensures secure and seamless access to both Dataverse and SharePoint.

3. Enable Document Management for Specific Tables

  1. Navigate to Settings > Document Management > Enable Document Management for Entities: Go to Settings, then Document Management, and select Enable Document Management for Entities.
  2. Select the tables you want to enable for document management:
    • Choose the specific Dataverse tables you need to manage documents for, such as Accounts, Contacts, or Custom tables.
    • This links the selected Dataverse tables to corresponding SharePoint document libraries, facilitating organized storage and retrieval of documents.

4. Establish Service Connection and Authentication

  1. Establish a connection between Dataverse and SharePoint: This enables data and document synchronization.
  2. Configure Single Sign-On (SSO) via Microsoft Entra ID: This allows seamless user authentication across platforms, ensuring secure and efficient access.


Here is a video tutorial from M365 help on embedding SharePoint Document Libraries into Model-Driven Apps. This tutorial shows you how to connect your Dataverse table with SharePoint and how to use the integration in a model driven app, ensuring seamless document management within your apps

Be sure to also check out this article written by Lewis Baybutt, a Microsoft Business Application MVP, on how to set up a document management system in SharePoint through the SharePoint and Dataverse integration.

Advanced Features

Here is an additional special feature that you can set up with your SharePoint integration to optimize processes and make your document management system even more powerful.

Document Sets

Document Sets in SharePoint are designed to manage groups of related documents as a single entity. This feature is particularly useful for projects or deliverables involving multiple documents that need to be managed collectively. Unlike folders, Document Sets allow for enhanced metadata inheritance, unified management, and the application of custom views and templates across all documents within the set.

Here is an example of how to organize your documents into document sets using SharePoint

Step 1: Setting Up Dataverse

Create a New Table in Dataverse

  1. Navigate to Dataverse
    • Go to the Power Platform Admin Center.
    • Select your environment and navigate to Dataverse > Tables.
  1. Create a New Table:
    • Click on + New Table.
    • Name your table Project Documents.
    • Define the primary column (e.g., Project Name).
  1. Add Columns:
    • Click on + Add Column.
    • Add the following columns:
      • Project Description: Text column.
      • Project Manager: Lookup to Users.
      • Start Date: Date column.
      • End Date: Date column.
      • Document Location: Text column (optional, for tracking document URLs if needed).

Step 2. Add Custom Columns to SharePointDocumentLocation in Dataverse:

  1. Access Your Environment
    • Log in to the Power Apps portal.
    • Navigate to your environment.
    • Modify the SharePointDocumentLocation Entity
    • Go to Data > Tables and select the SharePointDocumentLocation
    • Click on Add column.
  1. Add Custom Columns
    • For Document Location URL:
      • Display Name: Document Location URL
      • Name: documentlocationurl
      • Data Type: Text
      • Description: URL pointing to the document’s current location in SharePoint.
    • For Document Set URL:
      • Display Name: Document Set URL
      • Name: documentseturl
      • Data Type: Text
      • Description: URL pointing to the document set within SharePoint.
  1. Save and Publish
    • After adding the columns, make sure to save and publish your changes to make these columns available for use in apps and flows.

Step 3: Create a Model-Driven App

Create the App

1. Open Power Apps:

    • Navigate to Power Apps and select + Create.
    • Choose Model-driven app from the available options.

2. Add the Table:

  • Include the Project Documents table in your app, ensuring it has fields for tracking both the document locations and the URLs of the document sets created in SharePoint.

Set Up Forms

1. Edit the Main Form:

    • Navigate to the Forms section of the Project Documents table.
    • Customize the main form to include fields like Project Name, Project Description, Project Manager, Start Date, and End Date.
    • Include fields for Document Location URL and Document Set URL to track the SharePoint integration effectively.

2. Add a Subgrid for Document Upload:

    • In the main form designer, add a subgrid control.
    • Configure the subgrid to show related documents, allowing users to upload and manage multiple documents directly from the form.
    • Ensure this subgrid is properly configured to interact with the document management capabilities enabled in Dataverse and SharePoint.

Step 4: Configure Power Automate with Document Location and Set Creation

1. Create a New Flow

  • Open Power Automate:
    • Navigate to Power Automate and select + Create to start a new automated cloud flow.
  • Trigger:
    • Choose the trigger When a row is added, modified, or deleted in Dataverse.
    • Set this trigger to monitor changes in the Project Documents table.

List Rows from Document Location Table

  • List Rows:
    • Insert a Dataverse action to List Rows from the SharePointDocumentLocation table.
    • Use a filter to retrieve document locations that are related to the new or updated record, specifically pulling the Document Location URL.

Create Document Set in SharePoint

1. Send an HTTP request to SharePoint:

    • Replace the previous “Create Item” action with the Send an HTTP request to SharePoint action.
    • Configure the method to POST and set the URI to the SharePoint API endpoint that handles document set creation.
    • Include in the request body the necessary metadata to create the document set, including setting the content type to “Document Set.”
    • Ensure that all fields from Dataverse required for the document set metadata are correctly mapped in the HTTP request body.

2. Capture and Store Document Set URL:

    • After creating the document set, capture the response from the SharePoint API which includes the URL of the newly created document set.
    • Store this URL back into the Document Set URL field in the SharePointDocumentLocation table in Dataverse.

3. Move Documents to Document Set

  1. Move Documents:
    • Continue using actions to copy or move documents from the initial upload location to the newly created document set.
    • Utilize the Document Set URL that was dynamically retrieved from the SharePoint API response.

4. Update Document Location in Dataverse

  • Find Specific Document Location Record:
    • After the documents are moved, use a List Rows action in Power Automate to locate the specific Document Location record in Dataverse that needs updating.
  • Update Document Location Record:
    • Apply the Update a row action in Power Automate to revise the Document Location record with the new URL or ID of the document set in SharePoint.
    • This update should refresh the Document Location URL to reflect the new location of the documents in the document set.

Test the Flow

  • Save and Test:
    • Save the changes to the flow and conduct a test by creating or updating a record in the model-driven app.
    • Verify that documents are properly moved to the document set in SharePoint, and that the Document Set URL in Dataverse is accurately updated, ensuring seamless document management across platforms.

For detailed guidance and specific examples on setting up these processes, refer to the comprehensive tutorial on Regarding 365. This resource provides crucial instructions and code snippets necessary for successful implementation.

Conclusion

Integrating Microsoft Dataverse with SharePoint, enhanced by Power Automate, offers a streamlined solution for managing relational data and documents across applications. This integration simplifies workflows, boosts productivity, and enhances collaboration by centralizing data and document management.

Dataverse excels in handling relational data, while SharePoint provides top-notch document management. Power Automate ensures everything stays synchronized without manual effort. This combination saves time, reduces errors, and improves efficiency.

For businesses, this means seamless access to data and documents from a single interface, fostering better communication and teamwork. Proper setup and adherence to best practices are essential for optimal performance.

In short, integrating Dataverse, SharePoint, and Power Automate is a game-changer. It offers a unified, efficient solution that addresses data and document management challenges, helping your business stay ahead in a fast-paced environment. Embrace this integration to unlock new levels of efficiency and collaboration.

Facebook
Twitter
LinkedIn