Hi,
I'm currently migrating a number of 2003 developed forms (call them AQG and CAV), which have lots of jscript in them, to IP & SP 2010. The jscript in AQG has a couple of lines of code that opens a new form (CAV) & passes data to it - see below (to maintain the code I'm extracting the form files and editing script.js.
Code in AQG
var fred = Application.XDocuments.NewFromSolution("\\\\coportall\\sites\\bill\Caveat Form\\Forms\\template.xsn");
// set caveat waiver DOM
var MyFormDOM = fred.DOM;
MyFormDOM.setProperty("SelectionNamespaces", "xmlns:my=\"http://schemas.microsoft.com/office/infopath/2003/myXSD/2010-03-08T17:07:59\"");
// Copy the values from the AQG to the CAV form
MyFormDOM.selectSingleNode("/my:myFields/my:Originator").text = Originator;
MyFormDOM.selectSingleNode("/my:myFields/my:Originator/@my:Email").text = OriginatorEmail;
//etc. etc. - lots of stuff copied across.
=======
The form I'm opening via the NewFromSolution (CAV) has some other data connections that refresh on opening (incidentally, CAV opens fine if opened direct or by using a button with an action fromAQG).
This all works fine until I publish the form (CAV) in SP as a 2010 filler form and update the data connections to current version i.e. create the query and data field elements of the data connection.
The code above then ceases to work - the error I'm getting refers to invalid parameters on dataquery when the form attempts to open.
I'm wondering if it's anything to do with namespaces etc. and have been trying some things, but can't get it working..
Any suggestions would be appreciated.
Orlando A
Battista : An error doesn't become a mistake until you refuse to correct
it.
Terry