Submitting Form to a Folder within a Form Library - InfoPath Dev
in

InfoPath Dev

Submitting Form to a Folder within a Form Library

Last post 05-14-2009 11:11 AM by mcorbran. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 05-14-2009 11:11 AM

    • mcorbran
    • Not Ranked
    • Joined on 03-17-2009
    • New York
    • Posts 9

    Submitting Form to a Folder within a Form Library

    Hello Forum

    I have the following piece of code used to alter the main submit data connection.  This code captures two fields and concatenates them onto the existing submit data connection in order to submit this to the correct folder. 

     This works in the InfoPath client, but when publish to SP, we receive an error stating that the submit event handler returned a value indicating that the submit failed.  I have tried publishing the form both under Domain and Full Trust and still get the same issue. 

    Any thoughts??  Thanks 

     

    XPathNavigator xnLocation = xnDoc.SelectSingleNode("my:myFields/my:DocLibrary", this.NamespaceManager);
    XPathNavigator xnClient = xnDoc.SelectSingleNode("my:myFields/my:Client", this.NamespaceManager);
    XPathNavigator xnCampaign = xnDoc.SelectSingleNode("my:myFields/my:CampaignSelection", this.NamespaceManager);

    FileSubmitConnection fc = (FileSubmitConnection)this.DataConnections["Main Submit"];


    fc.FolderUrl = xnLocation.Value + "/" + xnClient.Value + "/" + xnCampaign;

    try
    {
      fc.Execute();
      e.CancelableArgs.Cancel = false;
    }

    catch (Exception ex)
    {
      e.CancelableArgs.Cancel = true;
    }

            

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