In my installation of MOSS 2007, editing a browser-enabled InfoPath form in a document library by choosing Edit in Browser from the context menu doesn't pass the 'Source' parameter (described in a post by Scott Jamison
here) in the URL to the /_layouts/formserver.aspx page. The parameter is passed correctly when creating a new form in the document library. The result of this is two different behaviors when users are finished editing the form and click the close button. If it's a new form, there is a postback and the browser redirects to the document library. If it's an existing form that is being edited, the browser doesn't redirect, instead it shows the following dialog:
The form has been closed. |
I came up with a work around - editing the custom action in the IPFS file:
%PROGRAMFILES%\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\IPFSSiteFeatures\FormServerEcbEntry\EcbEntry.xml
...and changing the appropriate UrlAction elements to include a source parameter, i.e.
<UrlAction Url="~site/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser&Source=<SCRIPT>document.write(escapeProperly(window.location.href))</SCRIPT>"/>
It's not the best solution however (because the file will get overwritten by any updates etc.) - but I haven't seen any other answers out there.