Skip to main content
I tried to clear the _K2:SN, but I just can not change its value. Your help will be highly appreciated.
I am using the following syntax to try to change its value to "tempValue", it does not give me an error but does not do anything either.
string strTemp2 = K2.ProcessInstance.XmlFields["K2InfoPathSchema"].Value;
K2.ProcessInstance.XmlFields["K2InfoPathSchema"].Value =
SourceCode.K2Utilities.XMLFieldMod.SetXMLValue(strTemp2, "my:myFields/my:_K2/my:SN", "tempValue");
I am using the following syntax to try to read _K2:SN value to DataFields["msSN"], but after running the code, the DataFields["msSN"] still contains the old value.
SourceField = SourceCode.K2Utilities.XMLFieldMod.GetXMLValue(K2.ProcessInstance.XmlFields["K2InfoPathSchema"].Value,"my:myFields/my:_K2/my:SN");
K2.ProcessInstance.DataFields["msSN"].Value = SourceField;
The serial number is a number that is generated by K2.net Server, this is used by methods like K2ROM.OpenWorklistItem to retrieve a specific worklist item, changing this will have no effect on the re-submit, however changing this can cause the K2ROM.OpenWorklistItem to fail with an error stating that the Item does not exist . Please explain to me what you need to achieve in more detail.

Reply