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
NangNang 

Refresh Visualforce Page After Edit Record

Hi all,
I have a <apex:commandLink> in visualforce page and the link has below property.
 <apex:commandLink action="{!URLFOR($Action.ObjectName.edit, Object.id) }">Edit</apex:commandLink>
And I need to refresh page after standard edit action, and I have searched but still have no idea?
I would like to know whether there is a way to refresh a page by using commandLink or other methods?
Thanks 
Nang
Chandrashekhar GoudChandrashekhar Goud
Hi Nang
 You can use reRender for this.
  Sample Code :
<apex:page Controller="nbsp">
     <apex:form >
 <apex:commandLink action="{!test }" reRender="hello" >Edit</apex:commandLink>
          <apex:inputField value="{!acc.Name}" required="true"/>
             <apex:outputpanel layout="block" id="hello">
           {!acc.Name}
        </apex:outputpanel>
    </apex:form>
</apex:page>
 
public class nbsp {
    public Account acc {get; set;}

    public nbsp(){
        acc = New Account();
    }
    public void test(){}

}

 
NangNang
Hi,Chandrashekhar Goud

It is not working when standard edit action is using in <apex:commandLink action="{!URLFOR($Action.ObjectName.edit, Object.id) }"> part. By the way, does Standard edit ation parameters working in lightning experience?
example {!URLFOR($Action.ObjectName.edit, Object.id,[parameter]) }
I have tried it in lightning experience but it is not working.
My code is as below
"{!URLFOR($Action.ObjectName.edit, Object.id,[API_Name=param1,retURL=param2])}"

Thanks 
Nang