Access InfoPath data file in SharePoint

R

Ron

I have a fully trusted InfoPath form in SharePoint. The user needs to be able
to duplicate the XML document when the form button is clicked. The problem is
I am unable to get a handle to the file. The code works just fine locally.
The problem seems to reside with SharePoint. Any suggestions?

//retrieve the document pathname
var sSource = XDocument.URI;
//create object for file manipulations
var fso = new ActiveXObject ("Scripting.FileSystemObject");
//confirm fso object is valid
var tTemp = fso.GetTempName ();
//check to see if file exists...doesn't :(
var sExist = "Does Not Exist";
if (fso.FileExists (sSource) )
{
sExist = "Does Exists!";
}
xDocument.UI.Alert ("sSource\n" + sSource + "\n\n" + sExist);
//fails because document "doesn't exist"
var aFile = fso.GetFileName (sSource);


Thanks,
Ron
 

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