The form definition file specifies that save functionality will be

108 views
Skip to first unread message

Nevo

unread,
Aug 4, 2009, 11:22:01 AM8/4/09
to
I'm a newbie to InfoPath and am trying to write a custom Save event handler.

I went to Tools, Form Options, Open and Save, checked "Save using custom
code" and clicked the Edit button.

The VSTA IDE opened and a template FormEvents_Save method is there. In the
InternalStartup() code, there's a line to add this event handler to
EventManager.FormEvents.Save.

I wrote my custom code and saved it. I saved the form template.

When I attempt to fill out a form based on this template, I get the
following error when I try to save the form:

"Microsoft Office InfoPath"
"InfoPath cannot save the form.
The form definition (.xsf) file specifies that save functionality will be
defined in code, but the code does not define an OnSaveRequest event handler."

Should I be writing my own OnSaveRequest handler? If so, how? If not, how do
I get InfoPath to put back in the default that should be there?

Ramkumar Thangavel

unread,
Nov 12, 2010, 2:02:06 AM11/12/10
to
..

> On Tuesday, August 04, 2009 11:22 AM Nevo wrote:

> I am a newbie to InfoPath and am trying to write a custom Save event handler.


>
> I went to Tools, Form Options, Open and Save, checked "Save using custom
> code" and clicked the Edit button.
>
> The VSTA IDE opened and a template FormEvents_Save method is there. In the

> InternalStartup() code, there is a line to add this event handler to


> EventManager.FormEvents.Save.
>
> I wrote my custom code and saved it. I saved the form template.
>
> When I attempt to fill out a form based on this template, I get the
> following error when I try to save the form:
>
> "Microsoft Office InfoPath"
> "InfoPath cannot save the form.
> The form definition (.xsf) file specifies that save functionality will be
> defined in code, but the code does not define an OnSaveRequest event handler."
>
> Should I be writing my own OnSaveRequest handler? If so, how? If not, how do
> I get InfoPath to put back in the default that should be there?


> Submitted via EggHeadCafe
> Silverlight 3D Animated Topic Selector With Titled Menu Items
> http://www.eggheadcafe.com/tutorials/aspnet/1add6e1c-6c70-4c2f-8b1a-5187961e5414/silverlight-3d-animated-topic-selector-with-titled-menu-items.aspx

Ramkumar Thangavel

unread,
Nov 12, 2010, 2:05:33 AM11/12/10
to
Reason: There may be some buid-in functions used in the form and that will never allow to save as this have functionality.

Resolution: Check with the control where the default value used with build-in function and remove it.

> On Tuesday, August 04, 2009 11:22 AM Nevo wrote:

> I am a newbie to InfoPath and am trying to write a custom Save event handler.


>
> I went to Tools, Form Options, Open and Save, checked "Save using custom
> code" and clicked the Edit button.
>
> The VSTA IDE opened and a template FormEvents_Save method is there. In the

> InternalStartup() code, there is a line to add this event handler to


> EventManager.FormEvents.Save.
>
> I wrote my custom code and saved it. I saved the form template.
>
> When I attempt to fill out a form based on this template, I get the
> following error when I try to save the form:
>
> "Microsoft Office InfoPath"
> "InfoPath cannot save the form.
> The form definition (.xsf) file specifies that save functionality will be
> defined in code, but the code does not define an OnSaveRequest event handler."
>
> Should I be writing my own OnSaveRequest handler? If so, how? If not, how do
> I get InfoPath to put back in the default that should be there?


>> On Friday, November 12, 2010 2:01 AM Ramkumar Thangavel wrote:

>> ..


>> Submitted via EggHeadCafe
>> ASP.NET 4.0 browser capabilities
>> http://www.eggheadcafe.com/tutorials/aspnet/668c15e2-9fe5-4a7a-94ac-001af0bf4d1b/aspnet-40-browser-capabilities.aspx

dinker454

unread,
Nov 15, 2013, 11:58:46 AM11/15/13
to
I have been wanting to do the same thing with my InfoPath form. Could you share your code with me? Correct me if I read your message wrong, your code will have a button on the form that will save the filled out form somewhere. I appreciate any help.
Reply all
Reply to author
Forward
0 new messages