You need to sign in to do that
Don't have an account?
mohsin ahmad 11
Do we need to create custom controller for the custom object ?
when we create a page, we make standard controller if we have to work on standard object like "Account". I want to know, do we need to make custom controller when working on custom object or simply we have to use customobject__c by using standard controller.
For eg: If I have a custom object Emplyee, then I have to make a custom controller with Employee__c or simply write standardcontroller="Employee__c".
For eg: If I have a custom object Emplyee, then I have to make a custom controller with Employee__c or simply write standardcontroller="Employee__c".
Yes you can use the standardcontroller with custom object as well.
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/apex_pages_standardcontroller.htm
To associate a standard controller with a Visualforce page, use the standardController attribute on the <apex:page> tag and assign it the name of any Salesforce object that can be queried using the Force.com API.
For example, to associate a page with the standard controller for a custom object named MyCustomObject, use the following markup When you use the standardController attribute on the <apex:page> tag, you cannot use the controller attribute at the same time.
Please let us know if this will help you
Thanks
Amit Chaudhary
You need to use the full Object API name, which is the same as the name of the standard controller:
example: Salesforce includes standard controllers for every standard and custom object. Every standard controller includes a getter method that returns the record specified by the id query string parameter in the page URL. This method allows the associated page markup to reference fields on the context record by using {!object} syntax, where object is the lowercase name of the object associated with the controller. So it is not required to create custom controller.
please follow this links:
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/apex_pages_standardcontroller.htm
,
https://trailhead.salesforce.com/content/learn/modules/visualforce_fundamentals/visualforce_custom_controllers
Thanks!!
Wendy’s Breakfast Menu 2022