Where is OnSaveRequest??

N

Nick Head

I am using SP-1 and the VS.Net Toolkit to write some managed event handlers. I am still learning how managed Infopath code works so please bear with me if this is a dumb question :)

I am trying to hook up the OnSaveRequest event, but I can't see where within InfoPath I should set it up. If I go to Tools > Programming I see OnLoad, On Context Change, On Switch Views, and On Sign, but there is no mention of OnSave. I assume I can't just write the event handler directly into my form code, as the event source isn't aware of it. So how do I hook this up?

As point of interest, whereabouts in the xsn solution are these event handlers actually hooked up with the event sources? e.g. if I set an OnClick event for a button, how does the form know that my OnClick event handler is supposed to be invoked?

Many thanks
Nick
 
B

Brian Teutsch [MSFT]

Just had to ask someone about this myself. You can edit the OnSave method by
using Tools->Form Options, and using the Open and Save tab create custom
code.

InfoPath uses the XSF file to know what events should be fired when using a
form. As you thought, InfoPath needs to be "hooked up" to the event handler.
If you're new to the XSF, it's an XML configuration file that you can view
by doing Extract Form Files while designing a form. The XSN is a collection
of files (CAB format), which you can then recreate by simply republishing
the form.

Thanks,
Brian
 

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