Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have tried this.Submit(), this.Save(), but neither seem to actually work. Is there a simple way of doing this? I have also tried using a submit button and then using custom rules for that, but still nothing. Finally, I tried doing Execute, but still nothing. Save gives a securty exception (think it needs full trust), and submit just never submits then gives a dialog saying so. Any simple ideas? Thanks!

share|improve this question
add comment

closed as off topic by Alex Angas Aug 6 '11 at 10:01

Questions on SharePoint Stack Exchange are expected to relate to SharePoint within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

Not sure if it's the same problem, but please look at this post:

InfoPath close form by code

The issue they were having had to do with how they were invoking the code-behind...i.e. they were using "Send form data to a single destination" and had the form code behind a button versus using "Perform custom action using Code" from the Submit Options dialog.

share|improve this answer
    
That is what I have at the moment, and submit just fails, saying 'InfoPath cannot submit the form. The OnSubmitRequest even handler returned a value indicating that the submit failed.' Any idea? Is there something that is different if you are submitting to a sharepoint site? –  Batman Aug 4 '11 at 16:51
    
Did you see if there is anything in the ULS? Maybe turn on verbose logging for the Forms Services category in CA and see if that reveals anything. –  Rob D'Oria Aug 4 '11 at 19:29
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.