+ Start a Discussion
m pandeym pandey 

Custom vf page

how to get edit and delete button in a custom vf page of account.....?
 
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,
Refer following vf page snippet
at place Of AccountObject pass the Account Object as per your requirement.
<apex:page controller="Sample" action="{!onloadgetAccountId}">
<apex:form >
    <apex:pageBlock id="details">
      <apex:outputText value="{!AccountObject}"></apex:outputText>
            <apex:commandButton action="{!URLFOR($Action.Account.delete,AccountObject.Id)}" value="Delete" id="deleteButton" />
            <apex:commandButton action="{!URLFOR($Action.Account.Edit,AccountObject.id)}" value="update" id="updateButton"/>

            
    </apex:pageBlock>
</apex:form>
</apex:page>

if you have any doubt feel free to ask.
Best Regards,
Amit Ghadage.
 
m pandeym pandey
Hi...
Edit | Delete   abc(record name).....
I have create custom class & page where it displays account recrds...wen i edit it should edit and when i should delete it needs to be deleted.....?
Can i know how...?
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
m pandeym pandey
Thank u so Much....
but also i need to get are you sure while deleting with pop up box may i know how it is possible...?