Find your content:

Search form

You are here

Reload the parent page from iFrame

 
Share

I have a standard account salesforce page, where i have a custom visualforce page included as a section. Now i want to reload a whole standard page if the button at the custom vf-page was clicked. Is it possible?


Attribution to: Sergej Utko

Possible Suggestion/Solution #1

While visualforce pages embedded inside standard records don't have access to any detail of the page, they can send to to another (or the same) page by setting the value of 'window.top.location'.

As you are in an account page, you want to send the browser to the account id preceded by a '/' character. You should be able to do this via an onclick handler on a commandbutton as follows:

  <apex:commandButton value="Refresh" onclick="window.top.location='/{!Account.id}'; return false" />

Note that the onclick handler returns false - this tells the browser not to continue with the standard flow, which is to complete the postback, which can result in an interesting race condition.


Attribution to: Bob Buzzard
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/4900

My Block Status

My Block Content