SharePoint paths limitations are hard coded. The maximum path length is 260 characters. If that limit is exceeded, you get the SharePoint error 414. This article outlines how to avoid this error.
Minimum requirements: AttachmentExtractor v.124 and/or DocumentsCorePack v.167 or higher
mscrm-addons products offer several default ways to shorten SharePoint paths:
1) We provide you with a default shortening to a maximum of 30 characters + GUID for each folder name.
2) We provide you with a default shortening to a maximum of 30 characters + GUID for each file name.
3) ShortIDs: We create a 6-characters ID alternatively to the well-known 36 GUIDs of Microsoft Dynamics 365 (CRM).
4) Use an alternative field for the generation of paths. (e.g. instead of account name we can use a unique account number field)
Please note: Even though the creation of short paths is a very valuable feature, existing paths cannot be shortened anymore, unless very specific criteria are met. Manual interaction is always required.
How to activate a ShortID for AttachmentExtractor
1) First, you must activate ShortID for AttachmentExtractor. To do so, please follow the below path in order to get to the ShortID settings.
Please note, that you must replace [YourServiceName] with your individual service name:
HKEY_LOCAL_MACHINE\SOFTWARE\PTM EDV-Systeme\AttachmentExtractorserver\Configurations\[YourServiceName]
2) Next, set UseShortID to true.
3) To define the cutting, you will have to create a new settingskey. If you have not created a settingskey yet, please have a look at this article.
Depending on which item you would like to customize, please enter the following settings:
For the maximum SharePoint folder name length:
SPMaxFolderLength: [number of characters that should remain]
For the maximum SharePoint file name length:
SPMaxFileLength: [number of characters that should remain]
For the minimum SharePoint file name length:
SPMinFileLength: [minimum number of characters that should remain]
Please note: The file extension is never cut!
Let us pretend, the minimum filename length set is 77.
If the actual file length is, for example, 80, you will receive an error message.
For the SharePoint folder name attribute:
SPFolderNameAttribute: enittyschemaname;attributename|
How to activate a ShortID for DocumentsCorePack
Creating a ShortID for DocumentsCorePack is easier than creating one for AttachmentExtractor. Simply navigate to Settings > DocumentsCorePack in your Microsoft Dynamics 365 (CRM) application.
Here, please add/enable the following options:
Use short Documentation Logic:
This setting cuts SharePoint path automatically.
SharePoint folder maximum length:
This setting cuts SharePoint folder names that are longer than a certain amount of characters.
Figure 1: DocumentsCorePack settings
For further information on how to correct SharePoint paths exceeding the limitations, please have a look at this blog article.
That’s it! We appreciate your feedback! Please share your thoughts by sending an email to support@mscrm-addons.com!