Open New Form On Submission - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Open New Form On Submission

Last post 02-17-2010 08:27 AM by Hilary Stoupa. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 04-22-2009 07:21 AM

    Open New Form On Submission

    Hello

      I am looking to have a button on a form that will allow the user to either close the form, or close the form and open a new form to submit another item. Just wondering if anyone has done this from the code. I have it published to a SharePoint forms library. I just don't want them to have to navigate back out to the site to get a new form. I want them to be able to open a new one from the form they are submitting. Any help is greatly appreciated. thanks in advance.

  • 04-22-2009 09:34 PM In reply to

    Re: Open New Form On Submission

    Hi,

    You can do this using rules. Add a rule to open a new form to fill out the form and give the url of the form which you want to open. Add second rule to submit the form.

    First write the code to submit the form then ad the following line to open the new solution.

    thisApplication.XDocuments.NewFromSolution(URI);

    Here URI is the url of the form whch you want to open.

    Swathip
    www.ggktech.com
  • 04-23-2009 07:26 AM In reply to

    Re: Open New Form On Submission

    Do I need to add a reference to something in order to get XDocuments.NewFromSolution(URI) to pull up? Currently I don't have those options in my code behind which is in C#.
  • 04-23-2009 08:18 AM In reply to

    Re: Open New Form On Submission

    Are you using InfoPath 2003 or 2007?

    For 2007, it is like:

    XmlForm newDocument =  this.Application.XmlForms.NewFromFormTemplate(@"C:\MyForm.xsn");

    code snippet copied from MSDN documentation located here.

    Hilary Stoupa

  • 04-23-2009 08:25 AM In reply to

    Re: Open New Form On Submission

    Thank you so much for the help. I searched for a couple hours and couldn't find anything. THANKS AGAIN.

  • 02-15-2010 01:41 AM In reply to

    Re: Open New Form On Submission

    Do you happen to have this for InfoPath 2003 C# ?

    Cheers
    Hilary Stoupa:

    Are you using InfoPath 2003 or 2007?

    For 2007, it is like:

    XmlForm newDocument =  this.Application.XmlForms.NewFromFormTemplate(@"C:\MyForm.xsn");

    code snippet copied from MSDN documentation located here.

    -------
  • 02-17-2010 08:27 AM In reply to

    Re: Open New Form On Submission

    Sure. For 2003, per MSDN:

    XDocument newDocument;
    newDocument = thisApplication.XDocuments. NewFromSolution (@"C:\MyForm.xsn");

    Hilary Stoupa

Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.