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
EnryEnry 

Open a standard record page in edit mode

Hi, It's very easy open the detail page of a new record created in a custom controller of a visual force page.

Example code:

 

public PageReference save() {
…….
        PageReference acctPage = new PageReference('/' + Influencer.id);
        acctPage.setRedirect(true);
        return acctPage;
    }

But i would like to be able to open the page of the new record in edit mode.

Please, can you help me?

Thanks in advantage for any advice.

Best Answer chosen by Admin (Salesforce Developers) 
Marko LamotMarko Lamot
public PageReference save() {
…….
        PageReference acctPage = new PageReference('/' + Influencer.id+'/e');
        acctPage.setRedirect(true);
        return acctPage;
    }