18. March 2015 13:00

How to create SharePoint locations, folders and subfolders automatically in DCP SB (OnPremise)?

Filed Under(CRM 2013 | CRM 2015 | DocumentsCorePack 2013 | DocumentsCorePack 2015) By Jin

This blog article outlines how to create SharePoint locations, folders and subfolders automatically within MS Dynamics CRM with DocumentsCorePack ServerBasedusing a simple workflow.

Add-On: DocumentsCorePack ServerBased (OnPremise)

For the MS Dyn CRM Online version of this article, please click here.   



Standard SharePoint location in CRM:

Figure 1: Standard CRM SharePoint window

Created SharePoint location:

Figure 2: Created SharePoint location

Generally, when creating a new account in MS CRM, all appropriate documents (e.g. quotes, invoices etc.) are saved in the entity Documents in MS CRM.
As you can see in Figure 3, the CRM Save location Documents can be accessed via the drop-down-button next to the current company in the main navigation area at the top. 
It could as well be accessed using our addon SmartBar, which enables a simple navigation between all related CRM records and entities.

Figure 3: Save location of documents in MS Dynamics CRM 

Anyway, to create a new Account in CRM, navigate to Accounts, then click on the [New]-button. 

Figure 4: Create a new account in MS CRM.

When you click on Documents (see Figure 3), the following message box appears. The box indicates, that a SharePoint location will be created manually with a click on the [OK]-button.

Figure 5: Message from webpage

The standard SharePoint location-window is empty and does not contain any folder(s) or subfolder(s).

Figure 6: Entity Documents, once an account has been created. 

Once documents have been saved, its look changes. 

Figure 7: Entity Documents with saved content

How to create a workflow that automatically generates SharePoint locations, folder(s) and subfolder(s) when creating an account

It is possible to create different subfolders in folders that contain certain documents (e.g. Quotes, Invoices …)

This can be managed with a simple workflow. 

In our example we define 

1) the SharePoint location,
2) the folder(s) and 
3) the subfolder(s) 
will be automatically triggered when creating a new account. 

First of all, open your CRM and navigate to Settings and Processes.

Figure 8: CRM > Settings > Processes

Now create a new process with a click on the [New]-button.

Figure 9: Create a new process

In the next window, define the following settings:

- Process Name: (here: CreateFolder)  
- Activate As: Process 
- Entity: (here: Account)     
- Category: Worfklow

Once this is done, click on the [Add Step]-button, select AutoMergeWF and CreateSharePointFolder

Figure 10: Add a new step (CreateSharePointFolder)

Now name the step (here: CreateFolder) and click on the [SetProperties]-button:

Figure 11: Name the new step 

In the following window, define the SharePoint location, folder(s) and subfolder(s).
For example: TEST/subfolder 1;TEST/subfolder 2;TEST1/subfolder 1

Figure 12: Example SharePoint subfolder added

Figure 13: Structure of TEST/subfolder 1;TEST/subfolder 2;TEST1/subfolder 1

Figure 13 outlines, that a slash indicates that the subfolder remains in a mainfolder. Furthermore, it outlines that a semicolon indicates the creation of a new main folder. 
Please note: the folder and/or subfolder name can contain blank space but you must not use a blank space between a folder and its subfoler(s) 

Once you have set up your order structure, please click on the [Save and Close]-button (see Figure 12). 

Now click on the [Activate]-button in order to activate your workflow:

Figure 14: Activate workflow

Then click once again on the [Activate]-button in order to confirm the process:

Figure 15: Confirm the process

Now your workflow is activated.

Figure 16: Activated workflow

Please note: it can take some minutes until the workflow has been entirely finished!

When you now create a new account and then navigate to the SharePoint document location, it should look similar to the example in Figure 17<. 

Figure 17: Example - SharePoint document location based on workflow

When opening the TEST-folder, the subfolders look as shown in Figure 18 and Figure 19.

Figure 18: Subfolder I

Figure 19: Subfolder II

That’s it! We appreciate your feedback! Please share your thoughts by sending an email to support@mscrm-addons.com.

Tags: ,

Tag Cloud

This will be shown to users with no Flash or Javascript.

Page List