+ Start a Discussion

Open the VF page on click of List view Edit button

Hi all, I don't know how to do this. Please suggest any idea, I have one Custom Object Accesioning , I  have created one visual force page to save the records into it. This Accesioning has Multiple relation with another object (all are child of this or look up relation). Now I want on the click of edit button of list view (Standard salesforce page) of accesioning . the same VF page should be  open with all the fileds already filled and I can update  the Accesioning object. Please help me in this any blog, any article or any idea.


One more thing. Can any one suggest me like If  the url of my page is https://c.cs15.visual.force.com/apex/Accession if I pass the id of particular accesioning as query string than it should show all the data of Accesioning  like  if I type this URL https://cs15.salesforce.com/a02e0000001eYCL


than detail page of particular accesioning is opening where ''a02e0000001eYCL" id id of a prticular Accesioning record.


Please suggest anything on any of the requirment





To override the standard Edit button the page should have standard controller like below:

<apex:page standardController="State__c" extensions="StateEditClass">
Then place all the fields on VF page using <apex:inputfield/>
 <apex:inputfield value="{!State__c.Name}"/>
Place a command button to do the action:
<apex:commandbutton value="Update" action="{!doUpdate}"/>
Standard Controller Constructor should be like below:
 public StateEditClass(ApexPages.StandardController controller) {
        objState = new State__c();
    public State__c objState{get;set;}
And the update action should be like below:
 update objState;
        return (new pagereference('/'+objState.Id).setredirect(true));
Implement the above steps,  then override the standard edit button with this visual force page. It works for you.