open url or new form - InfoPath Dev
in

InfoPath Dev

open url or new form

Last post 03-15-2010 01:16 PM by hefret56. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 11-23-2009 01:26 PM

    open url or new form

    Hello

      I have been tearing my hair out on this one... Infopath 2007.. MOSS 2007 Enterprise... New to browser forms... I am trying to open another infopath form when a user submits the first one (if a check box is checked)... I can get this to work from my client but when I publish the form (fully trusted) and upload it to the Infopath forms library in MOSS I cannot get it to work... Depending on which sets of code I am using I either get an error upon submitting (it says it will put an event inthe server's event log but it doesn't) or just nothing happens...

      The submit is done through a custom button. I have setup a submit connection. Using rules I get some data, set some data, and submit the form. Using code in the on click event for the button I check to see if the checbox is check and if it is I want to call the next form... How can I do this?? By the way I am trying to call the form using query string parameters so I cannot use the open form rule action...

       Please help!!!

  • 11-24-2009 05:26 AM In reply to

    Any one?? Please!!!

  • 11-24-2009 08:27 AM In reply to

    If you post your code, that would help. So, your submit is failing in the browser form? And the code opening the new form isn't being reached?

    Hilary Stoupa

  • 11-24-2009 08:39 AM In reply to

    The submit is sucessful.. The code just doesn't seem to do anything... This is the on click code... I've been doing some testing this morning and I can confirm that the code is being run... The code in this form generates a generic error.. I have tried other lines of code in place of line 3 and some generate erros and others just do nothing...  

    Public Sub CTRL1188_Clicked(ByVal sender As Object, ByVal e As ClickedEventArgs)

    If Me.MainDataSource.CreateNavigator().SelectSingleNode("/dfs:myFields/dfs:dataFields/d:CCGCoWeb/@WebERF_num", Me.NamespaceManager).Value() = "New" Then

    Application.XmlForms.NewFromFormTemplate("http://websiteurl/Forms/Engineering%20Request%20Form.xsn")

    End If

    End Sub

  • 11-24-2009 01:03 PM In reply to

    Which line generates the error? What is the error? I think you don't want () after Value, by the way, it is a property, not a method.

    Hilary Stoupa

  • 11-24-2009 01:21 PM In reply to

    Application.XmlForms.NewFromFormTemplate(http://websiteurl/Forms/Engineering%20Request%20Form.xsn)

    This is the line that generates the error...

    The error is very generic... Only There was a problem submitting the form.. There was a details section and it stated there was an event added to the server's event log... I looked and found no events...

    I figured the () wasn't needed but it worked so... Like I said in my first post.. This whole thing works fine when run from Infopath directly...

  • 11-24-2009 01:49 PM In reply to

    Ah. Per MSDN on NewFromFormTemplate:

    This type or member can be accessed only from code running in forms opened in Microsoft Office InfoPath 2007.

    So, we can't use that method in browser forms. Perhaps you should pass the URL of the form in and open a new browser window instead? I searched around a bit and found this:

    System.Diagnostics.Process.Start(http://server/library/Forms/template.xsn);

    The form has to be set to full trust to run, but since you are having to admin deploy already, that may not be a deal breaker. There may be a better way to open a new form from a browser form, hopefully someone else will add to this thread.

    Hilary Stoupa

  • 11-24-2009 01:57 PM In reply to

    I have also found the line of code.. And tried it and failed... That is the one of the examples where simply nothing happened... I beleive this is becuase the code is being run at the server... And last I knew server side code cannot run client side actions... Maybe I am incorrect??

  • 11-24-2009 02:22 PM In reply to

    That could very well be. I didn't think of that when I was experimenting....

    I wonder... could you just use a hyperlink control in the form? Another click for the user, I guess, but I'm not sure what else to suggest...

    Hilary Stoupa

  • 03-15-2010 01:16 PM In reply to

     Anyone find a solution for this?  As far as I can tell, the Hyperlink control cannot be configured at runtime.

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