Infopath in sharepoint

P

Palli

Hi

Is it possible to update a infopath document in Sharepoint. Currently I
have a button in my document that submits the doc to sharepoint. But now I
what to check to see if the document was opened thru sharepoint and then I
want to update current document, not submit a new one.

This is my code now... and it works but I need to add some code to see if
this doc was loaded from a sharepoint server and then update current doc,
not upload a new instance to the server.

public void Submit_OnClick(DocActionEvent e)
{
try
{
(thisXDocument.DataAdapters["Ad1"] as DAVAdapter).FileName =
"Doc1 - " + System.Environment.UserName + " - " + DateTime.Now +
".xml";
(thisXDocument.DataAdapters["Ad1"] as DAVAdapter).Submit();
thisXDocument.UI.Alert("Message");
}
catch( Exception ex)
{
thisXDocument.UI.Alert(ex.Message);
}

Thanks
Palli



}
 
M

Matriculator

Palli,
You should be able to open the file, then switch to design mode, and
save your changes.
You need to close any open instances of the file (including the one you
just opened) to save your changes. This has always worked for me after
I published to a SharePoint form library.
 

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