I am developing an infopath form that requires to be redirected to the main page after the processing is complete, the page should be redirected in around 10 seconds. I have come to know from some of posts in other forums and others that infopath does not have any inbuilt functionality to redirect to a page of your choice. So what I have done is that I right clicked on the button and do a "Edit form code". On button click I wrote only these 2 statements
The rules on button click specify form data Submit on certain conditons and not on others. Before writing this code everything worked fine. The form got submitted properly, every rule worked. But after adding this code to the template when I fill out a form and submit using this template I get this error on clicking the button: "An error occurred submitting this form to the Web Server". No rule seems to be working.
I have a few questions on this one and related:
1. Foremost, how to get rid of this issue?
2. When there are both rules and code on a button click what is the order in which the execution takes place.
3. Does this error mean that I will have to rewrite my rules in the form of code?
4. Any codeless work around for this?
5. How to debug infopath managed code?
Appreciate any help. Thanks in advance.