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
m pandeym pandey 

custom visual force page

how to get edit and delete button in a custom visual force page of account.....?
if click on edit it should edited and delete means it should deleted.....
Best Answer chosen by m pandey
vishnu Rvishnu R
hi....
<apex:column>
<apex:commandLink action="{!URLFOR($Action.Account.edit,a.id)}">
Edit
</apex:commandLink>
&nbsp; |  &nbsp;
 <apex:commandLink action="{!URLFOR($Action.Account.Delete,a.id)}">
 Del
 </apex:commandLink>
 &nbsp; | &nbsp;
 </apex:column>

just add this code in your vf page pageblock table...

hope this helps you...

All Answers

Amit GhadageAmit Ghadage
Hi pandey,
for deleting account use :
<apex:commandButton action="{!URLFOR($Action.Account.delete,AccountObject.Id)}" value="Delete" id="deleteButton" />

and to update use :
<apex:commandButton action="{!URLFOR($Action.Account.Edit,AccountObject.id)}" value="update" id="updateButton"/>

get AccountObject by get set or iterating List of Accounts as per your requirement

Best Regards,
Amit Ghadage.
vishnu Rvishnu R
hi....
<apex:column>
<apex:commandLink action="{!URLFOR($Action.Account.edit,a.id)}">
Edit
</apex:commandLink>
&nbsp; |  &nbsp;
 <apex:commandLink action="{!URLFOR($Action.Account.Delete,a.id)}">
 Del
 </apex:commandLink>
 &nbsp; | &nbsp;
 </apex:column>

just add this code in your vf page pageblock table...

hope this helps you...
This was selected as the best answer