Programmatically Submitting an InfoPath Form to a SharePoint Using

R

Raphael Iloh

Hi all,
Programmatically Submitting an InfoPath Form to a SharePoint Form Library
(Using C#)

Any ideas how to do this, using C# and not the JScript sample on MSDN?
 
S

S.Y.M. Wong-A-Ton

You can add a submit data connection to your form template (Tools menu) to
submit the form to a SharePoint form library, and then retrieve and call the
Execute method on the data connection in code. You can use the
DataConnections object to retrieve the data connection and do something like

DataConnections["<your_sharepoint_data_conn_name">].Execute();

If you want to submit the form to the same library it was opened from, you
can do something like in this blog post:
http://blogs.msdn.com/infopath/archive/2006/11/08/submitting-to-this-document-library.aspx
 
S

Stephan van Eeden

Hi Raphael



If you have your main data connection set up to submit to a document
library, you can either just say this.submit(); or
this.dataconnections["submit"].execute(); --replace ["submit"] with your
dataconnection name.



Hopes this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top