Submitting to sharepoint library using vb code - InfoPath Dev
in

InfoPath Dev

Submitting to sharepoint library using vb code

Last post 12-28-2007 03:15 PM by Clay Fox. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 12-28-2007 12:47 PM

    Submitting to sharepoint library using vb code

    I am creating forms in infopath 2007, that are backwards compatible with 2003.  I am needing to submit the form to sharepoint when the form is opened after the initial creation of the document.  I tried doign it by going to form options under tools, but i was given an error that the form cannot be submitted because it has not finished loading.  What is a way around this?  the main reason why i need this is that I need the modified(date) column within the document library on moss to update to the current time that the form was opened each time.

     I tried using code to do it using code similar to this:

    Dim sharepointSubmit As DAVAdapter = DirectCast(thisXDocument.DataAdapters("SUBMIT_SHAREPOINT"), DAVAdapter)

    sharepointSubmit.Submit()

     

    but it gives me the same error.  is that code for something else or is my use to submit to my library correct?

     

    Thanks

  • 12-28-2007 03:15 PM In reply to

    Re: Submitting to sharepoint library using vb code

    I believe this is due to the order in which rules and onload code runs.

    All you have to do is add a rule on open that does the submit and you will have it.  I have done this several times with SharePoint and never had an issue with submiting.

    Then you can also have a rule which runs the query for the date and populates a field or whatever.

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