In this blog we will discuss some extended custom functionality of uploading documents to SharePoint and CRM.
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.
- Open Documents view for any record.
- As you can see by default, document location gets created and documents get stored in highlighted location.
- We have created a custom button which takes parameters and create or update the folder structure.
- 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.
- You can see the predefined folders getting created. You select the folder you want to upload the file.
- Chose file and click Ok.
- In below screenshot you can see the file gets uploaded in the selected folder.
- Similarly, you can see in SharePoint how the folders get created and file automatically gets uploaded.