How to edit Form Fields with C# OnSaveRequest?

J

Jaco Leuschner

Hi,

I would like to edit the value of a field in the OnSaveRequest event but the
value does not change. Can someone help?

Ihave added my code below.

[InfoPathEventHandler(EventType=InfoPathEventType.OnSaveRequest)]
public void OnSaveRequest(SaveEvent e)
{
string ErrorAttribute =
thisXDocument.DOM.selectSingleNode("/ns1:SingleApplicationForm/System/ErrorsRemainYN").text;

int ErrorsLeft = thisXDocument.Errors.Count;
if(ErrorsLeft > 0)
{
ErrorAttribute = "yes";
}
else
{
ErrorAttribute = "no";
}
e.IsCancelled = e.PerformSaveOperation();
e.ReturnStatus = true;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top