Asked by:
How to get the 400 characters limit for URL field

Question
-
Hi ,
We are using the URL field of Link to a document content type to store the url for link in SharePoint online App development.
We get issue for storing URL with more than 255 characters. From documentation it seems that now this limit is increased to 400 characters but we get this issue for SharePoint online
Can anyone suggest me a way to store URL with more characters? we want URL field only as user should be able to redirect to that url on click of link.
Thanks,
Swati
All replies
-
Hi Swati,
The old "maxpath" limit was 256 Unicode code units, but it now has been expanded to 400 Unicode code units, but the expanded maxpath limit only applies to unencoded URLs. "There is no limit to encoded URLs in SharePoint Online and OneDrive for Business,"
Please read the below article how it works:https://redmondmag.com/articles/2017/05/10/microsoft-expands-sharepoint-online-url-path-lengths.aspx
Thanks&Regards,
Habibur Rahaman
C# Corner MVP,Project Lead,MCA,MCSA,MCP,MCTS
Note: If you feel the proposed answer is helpful, please mark as so or if this answered your question,please mark as answer.
-
Hi Swati.
Could you provide some examples of the URLs that are exceeding the 255 characters length?
The 400 characters maximum length applies only to unencoded URLs.Bye.
Luigi Bruno
MCP, MOS, MTA, MCTS, MCSA, MCSE
- Edited by Luigi BrunoMVP Thursday, November 14, 2019 2:44 PM
-
Hi, Swati,
Just as others said, this new limit section applies to the total length of the URL path to a folder or a file in SharePoint Online and OneDrive for Business but not to the length of any parameters. Also, these limitations apply only to un-encoded URLs, not to encoded URLs. There is no limit to encoded URLs in SharePoint Online and OneDrive for Business.
You can check it here:New MAXPATH limits in SharePoint and OneDrive
Best Regards
Jerry
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
SharePoint Server 2019 has been released, you can click here to download it.
Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019. -
Hi,
Thanks.This is how we the url looks like
We are assigning this value to Link to a document's URL column.
Thanks,
Swati -
-
Hi Swati,
If the above reply is helpful would you please mark as answer, so that other community members will find it as helpful... thanks for the understanding. :-)Thanks&Regards,
Habibur Rahaman
C# Corner MVP,Project Lead,MCA,MCSA,MCP,MCTS
Note: If you feel the proposed answer is helpful, please mark as so or if this answered your question,please mark as answer.
-
Hi, Swati,
Here is a workaround you can try. Use the Multi line text column. You may need to do it in classic experience. Create a Multiple lines of text column, set it to Rich text or enhanced rich text. Then you can edit the column value.
Go to the Multi-Text field and you will get Rich-Content Ribbon. Click Insert on the Ribbon > Hyperlink. Add your title and long URL in the respected field.
Best Regards
Jerry
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
SharePoint Server 2019 has been released, you can click here to download it.
Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019. -
Hi, Swati,
Here is a workaround you can try. Use the Multi line text column. You may need to do it in classic experience. Create a Multiple lines of text column, set it to Rich text or enhanced rich text. Then you can edit the column value.
Go to the Multi-Text field and you will get Rich-Content Ribbon. Click Insert on the Ribbon > Hyperlink. Add your title and long URL in the respected field.
Best Regards
Jerry
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
SharePoint Server 2019 has been released, you can click here to download it.
Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.I need to programmatically do it using CSOM to update the linkitem["url"] and linkitem["_ShortCutURL"] fields.
Thanks,
Swati -
Hi, Swati,
Here is a thread having several solutions you can have a try.
Best Regards
Jerry
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
SharePoint Server 2019 has been released, you can click here to download it.
Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019. -
Hi, Swati,
After a few days, is there any update about your task?
Here I am going give a brief summary about thread.
============================================================
Request/Expectation:
Make the URL filed able to store a long URL over 400 characters
============================================================
Suggestions:
Use a multi line text to hold or add the URL dynamically with workflow, Java script or other tools.
Reference Links:
Best Regards
Jerry
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
SharePoint Server 2019 has been released, you can click here to download it.
Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.