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
harita boyinaharita boyina 

public Example(ApexPages.StandardController stdController) in apex salesforce

public Example(ApexPages.StandardController stdController)
WHY WE ARE WRITING THE CONSTRUCTOR LIKE THIS WANTS THE DETAIL PRESCRIPTION
Dominic Blythe 18Dominic Blythe 18
Hi Harita.
This is a example of an extension to a salesforce standard controller. The standard controller is injected into the custom controller.
A standard controller is a reference to what salesforce natively uses to manage CRUD operations and similar on SObjects. The standard controller will have a reference to an SObject which can be returned by the getRecord() method.

For a full discussion of apex standard controllers, and more besides, I recommend the excellent book Visualforce in Practice available from www.developerforce.com/guides/Visualforce_in_Practice.pdf