Using a SharePoint Integration? Be Aware of the SharePoint Document Library Limits

Sending
User Review
0 (0 votes)

The Dynamics 365 – SharePoint integration is a very popular one. It does come with its own problems, namely regarding permissions and SharePoint Document Library Limits, but these can be overcome, as we will see further down.

But why is this integration so popular in the first place? Storing documents outside of Microsoft Dynamics makes a lot of sense, and Microsoft SharePoint is the obvious choice as the alternative storage:

  • You stay within the Microsoft ecosystem,
  • You use an integration provided by Microsoft itself (how to install tutorial here)
  • Depending what your licensing scheme, as SharePoint Online is part of Microsoft 365, you might even already have a license for SharePoint even if you were not previously using it

 

There are only two drawbacks you need to be aware of:

  • the permissions (as described in a previous article) and
  • the SharePoint list limits.

This article explains why SharePoint list limits are a problem and what you can do to fix it. But, first of all, let’s briefly go into what a SharePoint list is and what a document library is. Understanding the relationship between these two concepts is key to understanding the limits’ problem.

What is a SharePoint List?

Lists in SharePoint are containers that let you view and maintain information, just as with a database table. Like database tables, lists have columns and rows. Each column identifies the type of information that you store in the list. The information is then stored in each row. A list row, also called a list item, can have one or more file attachments.

What is a SharePoint Document Library?

You might have noticed that SharePoint libraries look an awful lot like SharePoint lists.

As a matter of fact, when you work with libraries, you’ll notice that they operate a lot like lists too. There is a reason for that: under the covers, a library is just a list.

What is a SharePoint document library, then? A document library is a special type of library that is centered around managing documents.

 

Please note that libraries typically contain documents, but they can also contain various other file types.  You can have, for example, a Picture library. That doesn’t mean, however, that there is any restriction on the types of files you can upload to a Document library. There isn’t.

As a final point on document libraries, it is important to note that just like on any list, you can also individually manage permissions for these files.

SharePoint Document Library vs List

As a document library is a type of list, they are similar in many ways. But they are not identical.

When looking at a SharePoint list vs a document library, the main similarities and differences are summarized in the following table.

  SharePoint List SharePoint Document Library
Item organization Columns and rows Columns and rows
Item Can vary Document
Storage of files Link to a SharePoint file object SharePoint file object
Permissions Individually managed for each item Individually managed for each item
Check-in/out Not available Available
Versioning Major versions only Major and Minor versions

If you want to delve into the Microsoft documentation on the SharePoint Client-Side Object Model to see all the details on the SharePoint library object, the link is at the reference section.

The SharePoint List Limit and the SharePoint Document Library Limits

You can store up to 30 million items in a SharePoint list or library at the time of writing. However, when the number of items grows beyond 5,000, you will be restricted from carrying out certain tasks in the list or library, including the following:

  • Being able to show more than 5,000 items in a single view
  • Retrieving more than 5,000 items through a single request
  • Adding columns

This is referred to in the official Microsoft documentation as the “list view threshold error”. Other sources refer to it as the “SharePoint online document library limits” or as “SharePoint online list item limit”, but, in fact, this problem affects all SharePoint versions you might find in use today, from SharePoint in Microsoft 365 to the much older SharePoint Server 2010.

I also often see it referred to as the “SharePoint list item limit” or the “SharePoint document library size limit”. To be super accurate, you should call it a threshold rather than a limit because it is a not-so-exact number over which performance is affected. But we’ll also be using the word limit across this article for simplicity’s sake.

Yet Another Limit – The Unique Permissions Limit

There is also another limit relating to the number of unique SharePoint permissions you can set, which is 50,000 items per list or library. This limitation exists in SharePoint 2010 and all following versions. It is applicable to lists, but as document libraries are a type of list, it also affects them.

 

This limitation is especially relevant if your SharePoint documents come from Dynamics 365. In that case, you need to fix the permissions in SharePoint for all those documents, as explained in this video. Every time you fix the permissions for one document, it counts towards the limit. As you can imagine, it is not that difficult to reach a total of 50,000.

Handling Sharepoint Document Library Limits

There are a few possible strategies to handle the SharePoint document library 5000 limit and the 50,000 unique permissions:

  • Strategy 1 – Offline data
    If you SharePoint online, you can take the data offline and then use Microsoft Excel or Microsoft Access to query your list data without the errors coming up. Naturally, having to take the data offline makes this strategy very limited in terms of application scenarios.
  • Strategy 2 –Daily Time Window
    With SharePoint Server on-premises servers (SharePoint 2010, 2013, and 2016), the network administrators can set a Daily Time Window where the limits are raised or removed. The problem with this strategy is that it can affect the performance for some or all users. Not to mention that you can’t use it for online versions.
  • Strategy 3 – Manual folders
    You can use folders to organize your documents. Doing it manually is a work-intensive task for the network administrators, but it can be effective and reduce the number of times you see the List View Threshold error. You also need to make sure your queries don’t return more than the List View Threshold.
  • Strategy 4 – Automatic folders
    This strategy is similar to the previous one, but the work is no longer done by the administrators but rather by an automatic tool called SharePoint Structure Creator. The administrators’ job is now to define the rules according to which the tool should create the folders. It is then fully automatic, as you can see in the video below.

 

An additional advantage of this strategy is that you can escape the original Dynamics 365 SharePoint integration folder structure. Instead of having everything organized on a per Account or per Contact structure, you have all flexibility to do it your way. This might sound like a minor change, but think about iot for a second… Wouldn’t youi users be happier (and more productive!) if they could quickly finding the documents they need in SharePoint?

Sharepoint Document Library Best Practices

Now that you know your option for handling the SharePoint document library thresholds, you might be wondering what else you can do when organizing SharePoint’s document libraries that will save you some troubles down the road.

Here are my favorite SharePoint document library best practices:

  • Best practice 1 – Restrict your sharing

Whenever you need to give access to a new user, evaluate whether it is enough to share an existing library with that user rather than the entire SharePoint site. The best practice is that you share only what you need to share.

For sharing at the library level, you need to break permission inheritance. This is how you should proceed. First, add your account to ensure you keep access, then remove the default SharePoint groups  (i.e., Owners, Members, Visitors) , and add whoever needs access to this. It is always better to add a SharePoint group rather than an individual user because of future changes.

  • Best practice 2 Break permission inheritance at the library level

Avoid breaking permission inheritance at the document level. While sharing at the site level is too wide, breaking the permission inheritance at the document level is too narrow. Try to keep the breaking permission inheritance at the library level or, if not possible, at the folder level.

  • Best practice 3 – Use folders

Define the general folder structure and naming convention as soon as you can. It is tricky to decide how to organize a SharePoint document library, as you will not be able to anticipate all needs. Start small and decide, for example, if the first level of folders will correspond to the teams, the type of document, the customer, the year, or what.

There is no one-size-fits-all answer for this, but the better you plan the folders in the beginning, the faster your users will locate the documents they need. Remember: one document can only be in one folder. If you feel a document should be in more than one folder using the structure you had in mind, have a look at the next best practice.

  • Best practice 4- Use metadata tags

Organizing folders in SharePoint will help you until you feel a document should be in more than one folder. When that is the case, it is time to consider if what you had planned as a folder should not be a metadata tag instead. Metadata tags can be used to track, sort, and filter documents. 

Final Verdict

If handling SharePoint Document Libraries is part of your job, SharePoint Structure Creator can be of great help. It will save you from all the troubles related to the SharePoint document library limits, namely the list view limit and the unique permissions limit.

If you have documents coming over from Microsoft Dynamics as a result of a Dynamics 365 and SharePoint integration, having such a tool in your toolbox is even more critical, as it will enable you to organize the documents on the SharePoint side as you see fit. This means your users will find documents in a more efficient way. All this from an install-and-forget tool.

Why not talk to our experts directly and have them check how this solution can help you?

 

By Ana Neto

Software engineer since 1997, she is now a technical advisor for Connecting Software.

Connecting Software is a producer of integration and synchronization software solutions since 2004. We operate globally and we are also a proud “Top Member” and “Top Blogger” at CRMSoftwareBlog.

 

 

References

How to Setup a Dynamics 365 integration with SharePoint

SharePoint Client-Side Object Model Protocol

https://docs.microsoft.com/en-us/openspecs/sharepoint_protocols/ms-csomspt/8ebba305-5af3-477d-bf4f-ad378a39eaba

The post Using a SharePoint Integration? Be Aware of the SharePoint Document Library Limits appeared first on CRM Software Blog | Dynamics 365.