M
Mullie21
I'm having issues assigning a value from JScript to a field. This is the
frist time I've coded in JScript. I read earlier that I had to declare my
namespaces. First question, how do I determine my namespaces? I believe I
only have 'My' because I haven't created any others. I used this to set the
namespace
XDocument.DOM.setProperty("SelectionNamespaces",
'xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-11-02T18:03:47"');
The field I'm trying to put data into is not linked to a database, its just
a field in the form. I'm using the following statement:
function XDocument::OnSaveRequest(eventObj)
{ // Write the code to be run before saving here.
eventObj.IsCancelled = eventObj.PerformSaveOperation();
XDocument.DOM.selectSingleNode("//myFields/my:Saved").text = true;
eventObj.ReturnStatus = true;}
As you can tell, I'm trying to populate a value, when the user saves the
form. I've tried this a million different ways, and everytime I get the same
error, "'XDocument.DOM.selectSingleNode(...)' is null or not an object".
What am I doing wrong? Any help is appreciated.
Thanks,
Chris
frist time I've coded in JScript. I read earlier that I had to declare my
namespaces. First question, how do I determine my namespaces? I believe I
only have 'My' because I haven't created any others. I used this to set the
namespace
XDocument.DOM.setProperty("SelectionNamespaces",
'xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-11-02T18:03:47"');
The field I'm trying to put data into is not linked to a database, its just
a field in the form. I'm using the following statement:
function XDocument::OnSaveRequest(eventObj)
{ // Write the code to be run before saving here.
eventObj.IsCancelled = eventObj.PerformSaveOperation();
XDocument.DOM.selectSingleNode("//myFields/my:Saved").text = true;
eventObj.ReturnStatus = true;}
As you can tell, I'm trying to populate a value, when the user saves the
form. I've tried this a million different ways, and everytime I get the same
error, "'XDocument.DOM.selectSingleNode(...)' is null or not an object".
What am I doing wrong? Any help is appreciated.
Thanks,
Chris