I have been trying to clean up some small things here and there but am not sure what to do for the following.
I have a couple scripts that help ABBYY to format and capture dates correctly in the doc def as I see many different formats, but after all the normalization's run in script rules, I get:
System.Runtime.InteropServices.COMException (0x80020005): Type mismatch.
The field in question is a date field. I tried creating one last simple rule at the end of the chain to change the Field.Value to DateTime but that didn't work.
string Date = Context.Field("StartDate").Text;
DateTime newDate = Convert.ToDateTime(Date);
Context.Field("StartDate").Value = newDate;
I am able to get the documents through as it's only a yellow error but am wondering how I can make this not happen to make the UI and process smoother.