function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Chethan SNChethan SN 

How to refresh VisualForce page on completion of action on Apex:Page tag

Hi All,
We have a visual force page with an action in apex:Page tag. This page is called on click of a quick action. This page is embedded as quick action for a custom object. I want to refresh the page once the action gets completed. Can anyone please give possible solution to this ? 

<apex:page extensions="WorkOrderComplete" sidebar="false" showHeader="false" action="{!WorkOrderCompleteAction}" StandardController="Work_Order__c">

Thanks and Regards,
Vinod ChoudharyVinod Choudhary
Hi Chethan,
public PageReference WorkOrderCompleteAction() {

       // Do your code here whatever you want to do in this method

        PageReference tempPage = ApexPages.currentPage();            
        return tempPage;

Hope this will help you.

Chethan SNChethan SN
Hi Vinod,
Thanks for reply.
I have used Pagereference at method definition and returning something like this. 

return new ApexPages.StandardController(currentWorkOrder).view();

This is same as your code isn't it ? 

Vinod ChoudharyVinod Choudhary
ApexPages.StandardController Returns the PageReference object of the standard detail page.
Chethan SNChethan SN
Yes. I want to show the detail page itself yet i want to refresh before showing it. I am using partner community.
This custom object's standard page is displayed after the action gets completed. I am just changing the page layout through the workflow based on status change by action. 
Flow : quickAction  --> VF Page --> Apex Pageref (Action) --> return to standard Detail page (Page layout change by workfllow).