Scenario is the following:
You have a mail view that you wish to mail instead of the default Edit form, so that you can design it better for mail clients and also remove any unrelevant information and buttons etc. So I have two views in my InfoPath form, and my Submit button should change to the Mail view when the form is submitted.
I add a Submit button and some rules. If you add the rules in the wrong order and you submit the form, you will get this message in the browser:
And you are not redirected back into the form library, which is what you want. So in order to get back into the form library after Submit, then add the rules in the following order on your Submit button:
1) Submit to library
2) Switch to your Mail view and Submit to Email
3) Switch back to View1 (default view) and Close form