Custom Document Structure in Dynamics CRM and SharePoint

Introduction:

In this blog we will discuss some extended custom functionality of uploading documents to SharePoint and CRM.

Purpose:

By default, document location is enabled for some OOB entities like Accounts, Contacts, Opportunities and by default document location gets created for records on first time load of Document Location associated view.

This is the OOB functionality but sometimes we might need some different structures for document storage according to the organization need.

In this blog, we will discuss one scenario where we can have a need to customize this Document Locations and automatically create a predefined folder structure in CRM and SharePoint which will help us to store our documents according to needed structure.

This functionality is described using the below screenshots.

  1. Open Documents view for any record.
  2. As you can see by default, document location gets created and documents get stored in highlighted location.
  3. We have created a custom button which takes parameters and create or update the folder structure.
  4. On click of Custom button, window opens where you can enter values and click Ok.

    Type: Create or Update

    Structure: Tree or Acyclic (Depends on Organization)

    URL: This is the SharePoint URL Site where you want to create folder structure.

  5. You can see the predefined folders getting created. You select the folder you want to upload the file.
  6. Chose file and click Ok.
  7. In below screenshot you can see the file gets uploaded in the selected folder.
  8. Similarly, you can see in SharePoint how the folders get created and file automatically gets uploaded.

Share Story :