Hello
I've got an extensible table wich has on each line a button.
This button has to open another infopath file and make a query depending on the line it was activated.
The files are both linked to a SQLserver database. Here is the code put on the button :
function CTRL63_7::OnClick(eventObj)
{
var n1 = null;
n1 = XDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:co_refdevis/@do_id");
var xd = null;
xd = Application.XDocuments.NewFromSolution("V:\\...\\FileToOpen.xsn");
var n2 = null;
n2 = xd.DOM.selectSingleNode("/dfs:myFields/dfs:queryFields/q:co_dossiers/@do_id");
n2.text = n1.text;
xd.Query();
}
When I click on a button, it opens the file correctly but throws an error (translated from french) :
Reference to non-declared prefix space : dfsIn debug, the error occurs on the line
n2 = xd.DOM.selectSingleNode(...);I don't understand because the two files are both based on SQLserver and dfs appears in both when i use formula.
Do someone knows what causes this error please ?
Thanks in advance.