Thursday, May 6, 2010

K2.Net 2003 workflow - Invalid text value exception issue

Issue:System.Exception: Invalid text value A text field contains invalid data. Please check the value and try again. at K2Code10097.Main(ServerEventContext& K2)

Description:This error is occuring when the K2.Net 2003 workflow was trying to insert the data into SharePoint list column, which is a single line text datatype.

Solution:Initially, when I looked at this error in K2Service Manager, I was thinking that the problem is with the datafields those are carrying data to update into SharePoint. I have one utility where I can query the complete DataFields data of a process Instance, and edit and update. Its kind of massaging the data and pushing into system. So using this I tried to update all the special characters with some encoded values for DataFields and tried to repair the error. But it didn't work at all. After a lot of trials, I started comparing the data size of the DataFields those are involved in updating the SharePoint columns with tye size of Sharepoint columns. Finally I found a column which has datatype as singleline text (allows 255 chars), but it was being tried to update more data than it allows. Then I changed the data type to multiline text and repaired the error. This time the error gone and process moved forward succesfully.

So the problem is with the data of a DataField that has more chars than the sharepoint column that was being tried to allows.
Hope this helps....

Access to XMLHttpRequest at 'from origin has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https. .net core angular

Issue: The angular application was getting error from API that the origin has been blocked by CORS policy. Solution: Make sure that the...