Switching views - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Switching views

Last post 04-09-2007 04:27 PM by Matt Faus. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-09-2007 01:31 PM

    • jdogan
    • Not Ranked
    • Joined on 01-15-2007
    • USA
    • Posts 9

    Switching views

    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?
  • 04-09-2007 04:27 PM In reply to

    I'm not 100% sure, but this sounds like it wouldn't be browser compatible. You should test by adding a button that has a RULE that switches views and see if that works.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.