[SalesForce] The VF page is in a pop up window. When the Case is created I want the parent window to redirect to the newly created Case

Have a link that calls a VF page for a user to fill in required fields then create a Test Record.
The VF page is in a pop up window.

When the Test__C is created I want the parent window to redirect to the newly created Record.

Everything works except closing the pop-up and redirecting the parent window.

Best Answer

I would suggest you not using a popup at all, instead use a modal popup which basically is a outputpanel in the parent VF page which is rendered as and when you want to show it.

You could very easily call any page using the page reference method. With this solution you dont need to worry about popup blockers blocking popups.

A detailed explanation of the code can be found in http://www.tehnrd.com/visualforce-pop-up/