Starting process with InfoPath form while updating SmartObject


Badge +5
I am working on an expense claim workflow which will be started by filling out an InfoPath form. The fields in the form are used for adding data to a SmartObject which stores the details of the claims. I have integrated the form with the create method for the SmartObject and have dragged the input properties onto the form. I have then integrated the form with the workflow by using an InfoPath client event. When attempting to submit the form I get an error "An error occurred while the form was being submitted." I assume this is because I need to do something else to get the form to update the SmartObject when using it with a client event like this, and that submitting the form does not trigger the create method?

5 replies

Badge +5
I should add that the form is being deployed to a Sharepoint forms library and displayed in the web browser.
Badge +9
Ah, using it in a web browser might be part of the problem, but there is a solution if this is the case.  To verify, check your event log for errors specific to the submission of the InfoPath form.  Also, it might help to have your blackpearl server running in console mode to see if you get any additional details on the failure.  Let me know what it says and we can get to the bottom of this.  Try submitting the form through InfoPath instead of the browser and see if you get a different result.
Badge +5
Thanks Tim. There's nothing in the event log. I tried using console mode and found out I didn't have process rights, oops! Sorted that out now and the form submits, but I don't get any data added to the Smart Object. Normally when I create a form to enter data into a Smart Object I drag the fields onto the form and then add a button to query using a data connection with the create method for the SmartObject. The form I'm using now is different because I don't have that button, I only have the submit button in the browser. It wouldn't be a very good design to have a button to click to submit the data, and then for the user to have to click another to submit. Is there a way I can get the form to run this query when I use the submit button when viewing in the browser? It looks like at the moment the create method does not get called.
Badge +9
I believe that in InfoPath you can add submit rules to your form, which can call your create Smart Object query before your submit.  I can give you more detailed instructions if you need 'em, hopefully this will set you on the right path.
Badge +5
Brilliant, that works perfectly! Just needed to add the create method in the submit rules. Thanks!

Reply