I have a code block that detects when signatures (even a specific signature) is removed, and inside this block, I want to set some field values.
Presently, I even know how to get and set field values using the XPathNavigator
class's .SetValue
method.
The problem comes in when I try to do both at the same time.
I'm assuming that the user will be removing a signature through InfoPath's built-in Digital Signature dialog box. The problem is, when a signature is removed this way, the modal dialog box is still open when the .Changed
trigger happens, thus preventing the fields from being changed, and throwing the error: "Operation is not valid, because of the current state of the object."
Is there some way to run the triggered code after the dialog has been closed? Or perhaps close the dialog box programmatically before setting the field values?