Applies to:
SharePoint On-Premises
Issue
In standard SharePoint forms, if a lookup column has to load a large amount of data, then it throws the below error message:
“System.InvalidOperationException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.”
Cause
This error occurs when the amount of data being serialized into a JSON string by the JavaScriptSerializer exceeds its default or configured maxJsonLength limit. (SharePoint uses JavaScriptSerializer to communicate data between the server and the client by facilitating the exchange of data in JSON format.)
Resolution
- Increase ‘MaxJsonLength’ property to its maximum value for the SharePoint web application. Refer to this article for details.
Note:
The maximum characters allowed in JSON output are 2,097,152 (2 MB). If even after performing the steps mentioned in above article does not resolve the issue, then it means that the data in lookup column exceeds the maximum limit permitted in the web application.
In such a case, below solutions can be performed:
Solution 1: Perform the archival functionality in any Crow Canyon Application:
- Archival feature moves old list items to the corresponding archived lists.
- This feature if not enabled by default, can be configured by referring to the below article:
Archival functionality in Crow Canyon Application – Crow Canyon Software Support
Solution 2: As a workaround, hide the lookup column (containing large data) in default ‘Content Type’ of the list.
- To hide the lookup column in a content type, navigate to the list -> List settings -> Advanced Settings -> Select ‘Yes’ for ‘Allow management of content types?’ -> Click ‘Ok’ to save the settings.

- On the list settings page, click the default content type. ‘Item’ is the default content type in this example.

- In the opened page, select the lookup column (that has large data) -> select the option ‘Hidden (Will not appear in the forms)’ -> Click ‘Ok’.

Solution 3: Upgrade to Crow Canyon NITRO Studio. Please contact Sales@crowcanyon.com for the upgrade.