-
Hi Paul,
You can't call the ''SaveAs'' method in the OnSaveRequest event handler, since that in turn calls the OnSaveRequest event handler causing an improper reentrancy. You should call ''eventObj.PerformSaveOperation();'' instead. Hope this helps.
Patrick Halstead [InfoPath MVP]
InfoPathDev
-
Hello.
(this is a copy from my question in the microsoft community, but there I get no answer - but I need)
I want so Save my form out of a js function.
After initialize the OnSaveRequest via the ''save as''-Menubutton, the
eventObj.IsSaveAs Property (read only) is true but after initialize OnSaveRequest with
XDocument.SaveAs(''c:\test.xml'') ...
-
Thanks again, however more questions, sorry to be so persistent. What I am ultimately trying to do is find the Last_Used field from the ProjectCategory secondary list that matched the ProjectCategoryCode (field from my Main Form), increment it by one and write the updated Last_Used back to my secondary data source.
This is relatively straight ...
-
Hi Dsmerda,
Welcome to the Forum!
Use ''Email'' as the keyword in the forum search, you should be able to find code to send email through code. Using that code you can change the email recipients list.
Hope this Helps!
Agni
InfoPath Dev India
-
You have to use
dim secField as IXMLDOMDocument2 = e.XDocument.DOM.selectSingleNode(''/my:myFields/my:dataFields/my:ProjectCategory/my:Last_Used'')
to select ''Last_Used'' node.
Agni
InfoPath Dev India
-
I work for a company that has multiple field supervisors that handle different areas. What I want to do is that when a person puts in a certain number in a different field in the form, it will send out an email to a predifined list.
For example:
if the person puts in the number 34, it will mail to person A, B, & D
if the person puts in the ...
-
Thanks again you have been mose helpful. I am still a bit confused. My secondary source has a Infodath default structure of: myfields/mydata/ProjectCategory/Last_Used. To Dim ''Last_Used'' to use in my code would i do this?
projectCategory.selectSingleNode(''/my:myFields/my:dataFields/my:ProjectCategory)
dim secField as IXMLDOMDocument2 ...
-
For primary DOM Namespace is set at the top of your code, this is taken care by Visual studio/InfoPath.
You can see this it starts with ''<InfoPathNamespace...''
For secondary doms you have to take care of all those things.
Agni
InfoPath Dev India
-
Agni, Thanks for the help. One question on your reply. I did not have to explicitly set the namespace on the primary DOM, so why do I have yo on the secondary DOM?
quote:Originally posted by Agni
Hi andywt,
If it is a secondary DOM you need to get that dom and then select a node from that.
You also have to set namespace property for that ...
-
Hi andywt,
If it is a secondary DOM you need to get that dom and then select a node from that.
You also have to set namespace property for that node
Dim projectCategory As IXMLDOMDocument2 = e.XDocument.GetDOM(''Project Category'')
projectCategory.setProperty(''SelectionNamespaces'', ...