You need to sign in to do that
Don't have an account?
Meer
Refresh Detail Page via VF Page
Hi..
I have a VF page which I have added in my custom control page layout.. In VF Page I have a button which save a particular record, I want to refresh the whole detail page after saving the record (i.e. onclicking the button). Can anybody help me with this how can I refresh the whole page? I searched it but didn't get the appropiate answer, however after trying most of the snippet I got my VF Page section refreshed but not the whole detail page.
Regards,
Meer
http://boards.developerforce.com/t5/Visualforce-Development/How-to-refresh-the-page-from-the-visual-force-snippet/m-p/274733/highlight/true#M35146
All Answers
Hi,
Use the below code snippet as reference:
======================Class===============
public class testRefresh
{
public boolean blnRefresh{get;set;}
public pagereference Save()
{
//Your code Here
blnRefresh=true;
return null;
}
}
=====================VF Page===============
<apex:page controller="testRefresh" >
<script>
if({!blnRefresh})
{
window.parent.location.reload();
}
</script>
<apex:form >
<apex:commandButton action="{!Save}" value="Save"/>
</apex:form>
</apex:page>
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
http://boards.developerforce.com/t5/Visualforce-Development/How-to-refresh-the-page-from-the-visual-force-snippet/m-p/274733/highlight/true#M35146