views:

44

answers:

1

I need to retrieve an Infopath File, which is displayed and filled in on a sharepoint webpage, and save it's data to a seperate DB. There are 2 events that fire once the form is submitted. ItemAdding and ItemAdded.

I know that I can not retrieve the file from the ItemAdding Event because it only gets saved after the ItemAdding Event.

But I want to redirect users to a different website once I have stored my values to the database, but I find no way to do this. I guess, the problem is that the ItemAdded event occurs, after/or at the same time as the user gets redirected to the webpage showing "The form has been closed".

How can I retrieve the values and redirect the user? Also, I am not allowed to attach code to the infopath form itself. This needs to be handled from Sharepoint.

Thank you

A: 

If you are redirecting within the SharePoint site you can include "source" as a query string parameter.

You also try a response.redirect in the OnClose event of the infopath form.

Estyn
Unfortunately I can not add code to the Infopath form itself, due to the requirements of the form. Could you explain what you mean with the 'source' query string parameter?
Michael Frey
http://msdn.microsoft.com/en-us/library/ms772417.aspxThat link should explain it. Essentially when you close an infopath form the server will redirect to the url that is included in the source parameter. This only works if you are opening infopath so that it takes up the whole page, if you are using the infopath webpart then this won't work for you.
Estyn
We were actually planning to use a webpart, but that can be changed, so this is the closest I can get as an answer. Thanks
Michael Frey