You need to sign in to do that
Don't have an account?

Using an Embedded Visual Force Page to Redirect to a Free Standing Visual Page
HI,
Is it possible that I can create a embedded Visual Force Page which can redirect to another Visual Force Page that will not be embedded into the Standard Controller parent page? I want the embedded page to function like the Command Buttons for a Standard Object's detailed page which, when created using a URL to another page can redirect you from that Standard Object page to a Visual Force Page which exists outside of the the contact detailed record page. In other words a free standing Visual Force Page.
For example:
Say you have some contacts who are associated with an account and you would like to create a button on the Contact record detail page that will call another page to create an opportunity for that Contact record. YOu can do this by creating a Command button and then creating a URL link with account and contact IDs as parameters.
Q) Can we also do this with an Embedded Visual Force Page which contains a command button to redirect to a page outside of the Contact Detail record page?
I am using a pick list of values for this embedded page that resides within a page block section. Underneath that pick list is a button which will redirect to another page when clicked but that new page now becomes embedded and overwrites the previous embedded page block section. I want that new page to be a free standing Visual Force Page.
Thanks for your help.
I didn't entire understand your last paragraph, but I think this may be what you are looking for:
http://stackoverflow.com/questions/11552514/visualforce-page-embedded-in-a-detail-page-that-needs-to-redirect-to-other-page
It describes an approach to redirect from a button on an VF page that is embedded on an object detail page to another VF page.
All Answers
I didn't entire understand your last paragraph, but I think this may be what you are looking for:
http://stackoverflow.com/questions/11552514/visualforce-page-embedded-in-a-detail-page-that-needs-to-redirect-to-other-page
It describes an approach to redirect from a button on an VF page that is embedded on an object detail page to another VF page.
Try something like this:
Your controller will have to implement the action method "public PageReference getURL()", which needs to assign the URL string to the property "public String theURL { get; set; }" and set the property "public Boolean goFlag { get; set; }" to true. Then, when the outer outputPanel rerenders, it will render the inner outputPanel, which contains the Javascript to open a new window. (You need two nested outputPanels, because you can't rerender something that isn't already rendered.)
If this helps, please mark it as a solution, and give kudos (click on the star) if you think I deserve them. Thanks!
-Glyn Anderson
Certified Salesforce Developer | Certified Salesforce Administrator
EDIT: I wrote this before looking at the StackOverflow post above. It's basically the same code!
Hi Glyn: thanks I tried the solution on Stack Over FLow and it seemed to work so I will see if I can do that with my code and let you know Just as an FYI :
Here is my Visual Force Page:
2) Here is the Extension Controller Code:
Thanks
Rob Dobby: thanks I will try this solution you gave and let you and Glyn A know what happens. So far I tried the test code in Stack Overflow but I just changes the Standard Controller getURL vallue to match the URL of the desired page I wanted to Redirect. Thanks much.
I tried it on my code and it worked. Both you and Rob deserve the credit but I don;t think I can check both. Thanks much for your help.
No worries. I'm glad you got it to work. Rob deserves the credit for getting the answer first. However, you could give us both kudos if you want. -Glyn