+ Start a Discussion
Rohit TripathiRohit Tripathi 

Reload Standard Detail Page from Inline Visual Force Page


I am using an inline VF page on a custom object page layout to calculate current location coordinates of user. Inline VF page calls an Apex Class and updates Geolocation fields in Custom Object with current location coordinates. Since it is inline VF page so everything happens behind the scenes. Is there any way to reload the Detail page from where VF page was triggered automatically once it has calculated the current location coordinates.
Jitendra RawatJitendra Rawat
Hi Rohit,

Have you tried javascript window.parent.href property. If not then it will resolve the issue.

Amit Chaudhary 8Amit Chaudhary 8

Please try below code. I hope that will help you
<apex:commandButton value="Refresh " action="{!FunctionName}" oncomplete="RefreshPrimaryTab('{!contact.id}'); return true;" status="waitStatus" />
<script type="text/javascript">

        function RefreshPrimaryTab(id) 
                  window.top.location.href = '/' + id;


Please let us know if this will help you

Amit Chaudhary
Please try this below link, it will work for sure:) 

<apex:commandLink  value=" Click Here" onclick="window.top.location='/{!accountid}'; return false"/> 

Pass the record id  and you are all set.