In many DBXL documents published by Qdabra Software, we add a data connection to the SubmitDocument method in the DBXLDocumentService. It should be noted that this web service will not return errors to the user. This means that if the submit should fail, users won't see an error message. And if the form is set to close after submit, the form will close and the data will be lost.
How can this be addressed? There are two main options:
- You could use the DBXLDocumentServiceEx web service instead. This web service is the SAME as DBXLDocumentService, except that it will return error messages.
- You could submit using the qRules command called SubmitToDbxl. The added benefit of this command is that it returns the new document's DocID, should you need it for anything within the form.
Of course, if an error is returned in either scenario, you'll want your form to NOT close, thus you avoid losing the user's data should the submit fail. For example, in the qRules scenario, your rule would be conditioned on SUCCESS=true(). If that condition is satisfied, then the form can be closed safely.
Showing error messages to users is risky since it can confuse users and interrupt their work. With some testing of the solution, you'll be able to address any potential issues before the form is launched to a production environment. For errors that slip through the cracks these two methods should catch them.
For a step by step description on how to submit to DBXL using qRules, please see this document:
http://www.infopathdev.com/files/folders/qrules/entry35303.aspx
For an example on how to use the DBXLDocumentServiceEx.asmx web service, please see this previous blog post:
http://www.infopathdev.com/blogs/jo-anne_alfafara/archive/2009/05/15/how-to-report-shredding-errors-to-form-users.aspx
If you have questions about either method above, please contact suppport (at) Qdabra (dot) com.