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

How to refresh the parent page after a Save action in a Visualforce page embedded in a page layout?
Hi all,
I have a VF page with a save button using only the standard controller. When the save button is clicked, the entire page was being loaded in the VF section.
So, I tried using the commandlink with the target_parent like -
<apex:commandLink value="Save" action="{!save}" target="_parent" styleClass="btn">
This worked fine in Chrome and Firefox but didn't work in IE despite checking all settings on IE. It opened a new window in IE with just the VF page.
So, I modified this to a command button like -
<apex:commandButton value="Save" action="{!save}" onclick="window.top.location='/{!<object>.id}'; return true"/>
But this doesn't save the record at all times. The behavior is erratic. At times, it does save the record and at times it doesn't. This behavior is noted on all browsers.
Please assist.
I have a VF page with a save button using only the standard controller. When the save button is clicked, the entire page was being loaded in the VF section.
So, I tried using the commandlink with the target_parent like -
<apex:commandLink value="Save" action="{!save}" target="_parent" styleClass="btn">
This worked fine in Chrome and Firefox but didn't work in IE despite checking all settings on IE. It opened a new window in IE with just the VF page.
So, I modified this to a command button like -
<apex:commandButton value="Save" action="{!save}" onclick="window.top.location='/{!<object>.id}'; return true"/>
But this doesn't save the record at all times. The behavior is erratic. At times, it does save the record and at times it doesn't. This behavior is noted on all browsers.
Please assist.
Try the following, which uses a javascript to redirect to the parent window:
http://stackoverflow.com/questions/11552514/visualforce-page-embedded-in-a-detail-page-that-needs-to-redirect-to-other-page
All Answers
Have you tried target="_top" ?
Sameer Tyagi
Try the following, which uses a javascript to redirect to the parent window:
http://stackoverflow.com/questions/11552514/visualforce-page-embedded-in-a-detail-page-that-needs-to-redirect-to-other-page
I have another issue with this. I have a few fields that have to be filled out (required=true) in the VF page. But the user could just fill two fields out of five and then click Save. The record has to be saved. At the moment that is not happening. The save button works only if ALL the fields are filled out. Can you please help?
I am doing I frame page to redirect external link but theat needs to display the same page please help me asap