I have a form template that has custom code that is executed upon form submit. This custom code simply sets a hyperlink URL (appending information to a query string) and switches the current view that contains the hyperlink that the user can click to continue with the workflow.
The view switching code is simply
ViewInfos.SwitchView("View 3");
This works fine when running within the InfoPath client, but when I run the same form template in browser-enabled mode, it throws a javascript error:
Line: 11795
Error: 'undefined' is null or not an object
This looks to be a standard Javascript error that is thrown if it can't resolve the name of the view I am trying to switch to. I have double and triple checked the names of my views and that appears to be fine. I have tried changing my view name so that it doesn't contain spaces, but that doesn't seem to affect the result.
I am thinking that this is a bug, but hopefully someone with more knowledge can confirm/deny?