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
Dheeraj ChaudharyDheeraj Chaudhary 

Apex Code Development

Can we get to know from where we can find the Standard controller 'Account' apex code? and Standard Account Visual force pages code..????
Amit Chaudhary 8Amit Chaudhary 8
Please check below post
1) https://developer.salesforce.com/docs/atlas.en-us.pages.meta/apexcode/apex_pages_standardcontroller.htm
2) https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_std.htm


Example
The following example shows how a StandardController object can be used in the constructor for a standard controller extension:
public class myControllerExtension {

    private final Account acct;
    
    // The extension constructor initializes the private member
    // variable acct by using the getRecord method from the standard
    // controller.
    public myControllerExtension(ApexPages.StandardController stdController) {
        this.acct = (Account)stdController.getRecord();
    }

    public String getGreeting() {
        return 'Hello ' + acct.name + ' (' + acct.id + ')';
    }
}

The following Visualforce markup shows how the controller extension from above can be used in a page:
<apex:page standardController="Account" extensions="myControllerExtension">
    {!greeting} <p/>
    <apex:form>
        <apex:inputField value="{!account.name}"/> <p/>
        <apex:commandButton value="Save" action="{!save}"/>
    </apex:form>
</apex:page>