Problems while Submitting to Sharepoint Library Using Code - InfoPath Dev
in

InfoPath Dev

Problems while Submitting to Sharepoint Library Using Code

Last post 12-24-2009 10:01 PM by Qazi Anis. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 12-24-2009 05:58 AM

    Problems while Submitting to Sharepoint Library Using Code

    i am now at work on the MOSS but when i use this code:

    //conection with this adress as the form library "http://Sharepoint/sites/pilot/Urendeclaratie"
    FileSubmitConnection fc = (FileSubmitConnection)this.DataConnections["Submit"];
                fc.FolderUrl = SPContext.Current.Web.Url.ToString() + "/verwerken";       //a submap in the library
                fc.Execute();

    now i want to put the form into differens maps in that library.
    but i get this error

    System.NullReferenceException
    Object reference not set to an instance of an object.
       at declaratie_met_code4.FormCode.FormEvents_Submit(Object sender, SubmitEventArgs e)
       at Microsoft.Office.InfoPath.Internal.FormEventsHost.OnSubmit(DocReturnEvent pEvent)
       at Microsoft.Office.Interop.InfoPath.SemiTrust._XDocumentEventSink2_SinkHelper.OnSubmitRequest(DocReturnEvent pEvent)

    this even occurs when i use this setup:
    http://Sharepoint/sites/pilot    as the DataConnection Adress

    /Urendeclaratie   as the fc.FolderUrl extra

    i tried putting the http://Sharepoint/sites/pilot/Urendeclaratie/verwerken directly in the DataConnection and then i am asked for a Login.
    and my own credentials does not work.

    so i searched the web for a way to submit anonymously and found this site (http://blog.metrostarsystems.com/2009/06/04/anonymously-submit-infopath-form-to-sharepoint-library/) but this also doesn't work (cant set the anonymous login)
    but becauce i dont want to submit it anonymous i have to find another way to solve this.

    any suggestions??

  • 12-24-2009 10:01 PM In reply to

    Re: Problems while Submitting to Sharepoint Library Using Code

    it seems that you dont have access to the other document libary. try giving yourself access to other document libary and see if that works

    Qazi Anis
    Technical Architect
    Bitwise Inc
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.