Understanding SharePoint Document Locations for Entity based folder structure–Dynamics CRM + SharePoint integration

Recently I was handling a training in Dynamics where I was demoing the OOB CRM SharePoint integration.

Client was already using the OOB CRM-SharePoint configuration using entity based folder structure. Anyone getting confused what is meant by entity based folder structure? Well while configuring you get an option to select whether based on Account/ Contact.

I selected Account here. Not a big deal.

image

But here it gets interesting. What if I upload some documents for a child record of an account and then change the account for that child record?

To duplicate this, I followed the below steps

  • Created two accounts – Account A & Account B
  • Created a case – Case | Document Test for Account A
  • In the Documents Section, uploaded file named – Document 1.txt

Let’ see the folder structure in SharePoint after this operation.

image

No surprises here. As we have chosen Entity based folder structure, the document got uploaded for the case under the account for which the case has been logged.

Now let’s go ahead and changed the account of the case to Account B

image

Now if we go ahead an upload a Document for the case – Document 2.txt, it should roll up under Account B. Let’s see that if it happens.

I go ahead and upload the document. But surprisingly it is still uploading under Account A in SharePoint.

image

 

Strange isn’t it? But why it happens? To understand this we need to understand the Document Locations record that CRM uses to map to the corresponding folder in SharePoint.

The following are the document locations record that got created after we uploaded Document 1.txt.

image

As you can see, four document location records got created

  • One for entity – account
  • One for account record – Account A
  • One for entity – (case)incident
  • One for case record – Case| Document Test

As you can see all are named “Document on Default Site 1”. This is confusing. So let’s name it accordingly.

Below is the screenshot after renaming. Probably looks simpler now with the names.

image

Looks go ahead and create the document location record manually for Account B.

image

 

image

 

image

 

If you now come back to the Case record and move to the Documents section, you will find two document locations now but if you select the Account B Document Location record, you will find no upload button.

image

This is because the corresponding folder in SharePoint does not exist. Lets go and create that.

image

 

Now if you go ahead to the case and move to the Documents section, you would find both the Document Locations for previous and current account.

And if you now upload a document to the case for the current account, it goes and sits at the right place. And you can always switch back to see what were the documents uploaded for the previous account as well.

image

Hope this helps!

 

Debajit Dutta

(Dynamics MVP)

For training/ consulting/ tools, please visit www.xrmforyou.com

Advertisements

Author: Debajit

I am a Dynamics CRM Most Valuable Professional (MVP) with 10 years of experience in Microsoft .NET Technologies and 7 years of dedicated experience in Microsoft Dynamics CRM. I have worked with companies like Microsoft, SanDisk, PwC, TMF Group and have extensive experience of implementing complex CRM solutions from both offshore and client side. Currently the face of XrmForYou.com with significant experience in delivering corporate training on Dynamics CRM and have already delivered multiple projects to client through XrmForYou.com Author of multiple tools on codeplex including the 'Role Based Views' and 'CRM-Sharepoint Metadata manager & Attachment Extractor' which are available for commercial use under XrmForYou.com For consulting/ training, drop me a note at info@xrmforyou.com or visit our website www.xrmforyou.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s