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

Edit Button in VF Page

Hi All,

I have one checkbox (left side) when ever i checked  the checkbox and click on Edit button here I want edit the the that particula  record in VF page(here User__c is a custom object).Please share any idea...

Please find my attaches image..

User-added image

You mean do you want to open the edit page of the record when edit button is clicked?
Yes  ...
Saravanan @CreationSaravanan @Creation

You can do this by using apex:parm tag, apex:actionsupport tag. When you click the checkbox you can pass the record id to
controller by using apex:param tag and you can do rest of the action.

This is what that comes to my mind.

On clicking of checkbox you can have an actionsupport tag which would call a controller method and store the Id of the record.Then,on click of Edit button you can call the id and redirect to the Edit page for that record.

hope this helps!!
A simpler solution would be instead of checkbox you can try the below with OutputLink and $Action:

<apex:page standardController="Account" recordSetVar="acc">
<apex:form >
  <apex:pageBlock title="Accounts">
  <apex:pageBlockSection title="Account List">
  <apex:pageBlockTable value="{!acc}" var="act">
  <apex:column >
    <apex:outputLink value="{!URLFOR($Action.Account.Edit,}">Edit</apex:outputLink>
    <apex:column value="{!act.Name}"/>
Hi  @Saravan and @Vinit,

  Can any one please paste some sample code using controller and vf page..

Saravanan @CreationSaravanan @Creation

Below blogs are example form apex param tag
check only apex param  and how its used in above code