locked
Dynamic submit URL for form RRS feed

  • Question

  • Hi,
    I am using a data connection in my IP form to submit form to a form library. In development environment my data connection is configured to submit at http://MachineName:port/FormLibrary.

    But in production environment i don't have InfoPath installed to update the connection according to new environment. how can i make the url dynamic or any other work around to achieve the same.

    Thanks


    fijaz
    Tuesday, September 16, 2008 1:47 PM

Answers

  • You can try modifying the data connection file (.udcx) and provide the destination form library url here.

    Do let me know if this helps.

    Thanks,
    Paresh
    • Marked as answer by Farrukh Ijaz Monday, September 22, 2008 5:57 AM
    Wednesday, September 17, 2008 11:14 AM

All replies

  • You can try modifying the data connection file (.udcx) and provide the destination form library url here.

    Do let me know if this helps.

    Thanks,
    Paresh
    • Marked as answer by Farrukh Ijaz Monday, September 22, 2008 5:57 AM
    Wednesday, September 17, 2008 11:14 AM
  • Where/how do you modify the .udcx? 

    You can modify the data connection in code, but you would need to somehow identify to the code whether the deployment as production .vs test.  Here is a VSTA example of changing the submit in code:

               Dim fc As FileSubmitConnection
                Dim strPath As String = "http://my.Web.com/site/formlib"

               fc = DirectCast(Me.DataConnections("SharePoint Library Submit"), FileSubmitConnection)
               Dim strLoc As String = strPath.Substring(0, strPath.LastIndexOf("/"))
               strFolder = strSaveFolderNav.Value.ToUpper
               fc.FolderUrl = strLoc + "/" + strFolder
    fc.execute


    /bac
    • Proposed as answer by BobChauvin Wednesday, September 17, 2008 12:46 PM
    Wednesday, September 17, 2008 12:45 PM
  • Thanks Paresh,
    I was not using data connection files earlier, that solved my problem.

    fijaz
    Monday, September 22, 2008 5:58 AM