<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Close browser enabled form and redirect to dynamic URL</title><link>https://www.infopathdev.com:443/forums/thread/53527.aspx</link><pubDate>Fri, 09 Apr 2010 14:52:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53527</guid><dc:creator>Tomas_Andrews</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53527.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=53527</wfw:commentRss><description>&lt;p&gt;Hi Everyone&lt;/p&gt;
&lt;p&gt;I was hoping someone may be able to shed some light on the best way to close and redirect a browser enabled form.&lt;/p&gt;
&lt;p&gt;Here is the scenario:&lt;/p&gt;
&lt;p&gt;I have a form (Form A) with a submit button, when the form is submitted to a SharePoint form library the view is switched to different view confirming the form was successfully submitted. &lt;br /&gt;This view (View 2) contains another button which closes the form and uses custom code to redirect the page to a new URL using: &lt;/p&gt;
&lt;p&gt;HttpContext.Current.Response.Redirect(&lt;a href="http://test.com/"&gt;http://test.com&lt;/a&gt;, false);&lt;/p&gt;
&lt;p&gt;I have a workflow attached to the library which creates a new form (Form B) in a different form library when Form A is submitted. &lt;/p&gt;
&lt;p&gt;The workflow also updates the status of the existing form (Form A) to confirm it was approved and Form B was created successfully.&lt;br /&gt;***however since adding the code to Form A the workflow (created using SPD) is unable to update the item - I’ll come back to this later&lt;/p&gt;
&lt;p&gt;The workflow is also configured to send an email to the user to direct them to Form B, however I would much prefer to have Form A - View 2 to redirect them to Form B after clicking on the close button.&lt;/p&gt;
&lt;p&gt;I have generated the URL which is stored in a form field but am unsure how to close and redirect the form using custom code behind the button - is this possible?&lt;/p&gt;
&lt;p&gt;I am aware I can use a hyperlink in the form, however this doesn’t close the form, it simply opens a new window.&lt;/p&gt;
&lt;p&gt;Any thoughts on how to achieve this would be greatly appreciated!&lt;/p&gt;
&lt;p&gt;*** It seems as if the form is still open when the workflow tried to update the metadata on the form as it reports:Error updating a list item Access Denied - any feedback on this is also very welcome!&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Tomas &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>