I am trying to run a C# script which takes a substring from one field (text matched to regular expression) and writes its content to another field.
The problem is that when I run test in Script Editor window an error message pops up which says:
System.Runtime.InteropServices.COMException (0x80004005): Unable to modify a read-only field 'ContractorOKPO'. at ABBYY.FlexiCapture.IField.IField.set_Text(String _result).
Does it mean that there is no way manipulating Fields values with scripts at a Document Definition level?
There is confusion about stated error as documentation says that Text property of IField type is nor READ-ONLY
This is the script I am trying to run:
IField dataField, OKPOField;
OKPOField = Context.Field("ContractorOKPO");
dataField = Context.Field("ContractorData");
extractedData = dataField.Text;
OKPOField.Text = extractedData;
Would be happy to hear suggestions from anyone around.
Make sure in the window where you add the fields to be used you have unchecked the readonly checkbox for the proper field.
Let me know if that does not work.
Thank you, didn't notice it at first.
I have unchecked the ReadOnly CheckBox in the Document Definition Edit Window but still I am facing the same issue as
System.Runtime.InteropServices.COMException (0x80004005): Unable to modify a read-only field 'Seller'. at ABBYY.FlexiCapture.IField.IField.set_Text(String _result).
Please sign in to leave a comment.