More than one record in Dynamics 365 pointing to the same folder in Sharepoint – Dynamics 365 and Sharepoint integration.

Follow my blog for more interesting topics on Dynamics 365, Portals and Power Platform. For training and consulting, write to us at info@xrmforyou.com

CRM-Sharepoint integration – This topic has certainly lost the steam by now and anybody working in dynamics over the last 7-8 years have tried it out so many times. Done and dusted topic, isn’t it?
But just when I think I know it all, Dynamics surprises me with some hidden nuances and my today’s post is on it.
So here I was, setting up the mundane CRM-Sharepoint OOB integration and directly set-it up in client’s production environment. OOB feature, no testing required. But suddenly one issue reported by customer – “My two records in account are sharing the same folder in Sharepoint”.
But how is that possible? A little bit of digging and this is what I found out.
In Dynamics CRM – Sharepoint integration, the folder gets formed in the format – Primary Attribute Field value_<Guid>. So if for an account record, it would be <account name>_<account guid>.
Now let’s play around with the Account Name.
This is below account name I have given for one record.
“the quick brown fox jumps over the lazy dog. the quick brown fox jumps over the lazy dog. the quick brown fox jumps over the lazy dog. the quick brown fox jumps over the lazy dog.”
Below is the name for other account record.
“the quick brown fox jumps over the lazy dog. the quick brown fox jumps over the lazy dog. the quick brown fox jumps over the lazy dog. lorem ipsum dolor sit amet.”. Notice the part in bold I have changed from the previous account.
Now, let’s go and see the folder created for the first account record.
image
There is no guid in the folder name. The reason is in OOB integration, folder name limit is always 128 characters. So if primary attribute name length is more than 128 characters, it would be trimmed to 128 characters and then the folder name is formed. So first lesson learnt, the Guid is not mandatory in the folder naming in Sharepoint for CRM-Sharepoint OOB integration.
Now it’s obvious that this is a potential root-case of problems. I also uploaded one document for this record and as you can see from the screenshot.
Lets go ahead and see the folder created for record 2.
image
As you can see from the above screenshot, the folder name for record 2 is also mapped to the folder for record 1. This is because the first 128 characters for both the account records are same. Hence the same folder got created. And as you can see, although I have not uploaded any file in record 2, still the file uploaded in record 1 is visible here.
This can be a potential problem.
Hope this helps!
Debajit Dutta
(Dynamics MVP)
For training/ consulting/ tools please visit our website www.xrmforyou.com or write to us at – info@xrmforyou.com


Discover more from Debajit's Power Apps & Dynamics 365 Blog

Subscribe to get the latest posts sent to your email.

Discover more from Debajit's Power Apps & Dynamics 365 Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading