How to Bulk Create SharePoint Folders in Dynamics 365
Instead of manually creating a SharePoint folder for every Microsoft Dynamics CRM record, you can also create them automatically in bulk.
Tip! PowerAttachment can save space inside Dynamics 365 by storing attachments inside your SharePoint integration. Start a free 30-day trial now.
To begin bulk creating SharePoint folders for the account entity, follow these steps:
- Once you have your SharePoint site configured in CRM, the first step is to create a map drive to your SharePoint site. There are many different ways to map a drive, but the easiest option is to right click on My Computer and select Map Network Drive. Select the drive letter and enter in the path to your SharePoint site. https://sharepoint.crm.sharepoint.com.
- Get your list of Accounts that you want to create the folders for. Within CRM, go to the Account entity and open the Advanced Find function. From here you can pull up the active Account view and modify the columns only to include Account name.
- Run that query and export the list to Excel. Save the file to your local computer.
- Open the Excel document you just created. To this document, add two new columns.
First, create a new column where all it has is a quote. Copy this to each cell.
Then create the following formula: =CONCATENATE(B2,A2,B2). Now copy the formula to each cell that has an account value in it. Your excel sheet will look like this:
- Open Notepad and add the drive letter that you used in step one. Use the CD command (Change Directory) on the entity that you are creating all the folders for (Account in this case). Once that is done, copy and paste the new column that you created in Excel into notepad. Save the file with the .bat extension. Your file should look similar to the one below.
- Run the .bat file. This may take a while depending on the number of folders you are creating.
- Once the folders are created, update CRM with the URL to the specific folder. This can be done by creating an on demand workflow. To do this, first create a workflow with the following attributes:
on demand workflow process
user owned (to prevent someone else from accidentally running the workflow).
- Now add a Create step to create the document location. Select the Relative URL from the lookup. Select the Account name for the relative URL. Select the account for the regarding field.
- Run this workflow for each Account. Click the workflow button from the ribbon and select the workflow you just created in the step above. Once the workflow has completed, you can now go to the documents section in the left navigation to see SharePoint and CRM linked together.
With this simple process, you can eliminate the daunting task of manually creating a SharePoint folder for every CRM record.
How to Save Money on Licensing for Office 365 and Dynamics 365
Most companies can save money on Dynamics 365 and/or Office 365 licenses when enrolling in PowerObjects’ no-cost CSP program. Learn how much you could be saving here.