Symptoms
I created a new K2 Application from a SharePoint list, something I have done many times before, and am getting this error when I try to modify and save the New form view:
String or binary data would be truncated. The data for table-valued parameter "@Field" doesn't conform to the table type of the parameter. SQL Server error is: 8152, state: 10 The statement has been terminated.
?Type: System.Data.SqlClient.SqlException
?Source: .Net SqlClient Data Provider
?Stack Trace:
at SourceCode.Hosting.Client.BaseAPI.BaseAPIConnection.RemoteCall(String TypeName, String MethodName, Objectt] Parameters, Booleann] NullList, MarshalMessageType CallType)
at SourceCode.Hosting.Client.BaseAPI.BaseAPI.RemoteSessionCall(String TypeName, String MethodName, Objectt] Parameters, Booleann] NullList)
at SourceCode.Forms.Management.FormsManager.DoSessionCall(String method, Objectt] parameters, Booleann] nullList)
at SourceCode.Forms.Management.FormsManager.Deploy(String definition, String category, Boolean checkIn, Boolean skipReferenceValidation)
at SourceCode.Forms.AppFramework.ViewFramework.saveView(String CheckIn, String CategoryPath, String ViewXml)
at SourceCode.Forms.Views.AJAXCall.ProcessRequest(HttpContext context)
What is the problem here?
Diagnoses
Name of the choice column has more than 115 characters.
Resolution
Workaround:
Edit the Smartobject that was generated for the Choice column and make the name 115 characters or less.
Issue have been logged as bug and it will be fixed on a future release of the product.