Error Handling in InfoPath 2007 browser enabled form using web service in code - InfoPath Dev
in

InfoPath Dev

Error Handling in InfoPath 2007 browser enabled form using web service in code

Last post 03-19-2009 02:27 PM by Macrel. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 03-19-2009 02:27 PM

    • Macrel
    • Not Ranked
    • Joined on 03-19-2009
    • Posts 3

    Error Handling in InfoPath 2007 browser enabled form using web service in code

    Hello,

    I am trying to get useful error messages to return to the infoPath form after submitting a browser enabled form via a web service. I would like to replace the "An error occurred while the form was being submitted." message.

    Here is my InfoPath code.

    public void FormEvents_Submit(object sender, SubmitEventArgs e)

    {

    try

    {

            // Invoke the data connection

            DataConnections["Incident Form Submit"].Execute();

            e.CancelableArgs.Cancel = false;

    }

    catch (Exception ex)

    {

            throw new SoapException("This is a test exception:" + ex.Message, SoapException.ClientFaultCode);

    }

    Macrel
Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.