Activity › Forums › Salesforce® Discussions › Can we use Standard Controller & controller attributes at a time in Salesforce?
Tagged: Apex Page, Controller Attribute, Salesforce Extensions, Salesforce Help and Training, Standard Controller
-
Can we use Standard Controller & controller attributes at a time in Salesforce?
Posted by Anjali on October 5, 2018 at 1:12 PMCan we use standardController & controller attributes at a time?
William replied 7 years, 3 months ago 4 Members · 3 Replies -
3 Replies
-
Hi,
No, We cannot reference both attributes at a time.
See below syntax to understand
<apex:page standardController=”ControllerName” extensions=”Class1, Class2,..”> Correct
<apex:page Controller=”MYControllerName” extensions=”Class1, Class2,..”> Correct syntax
<apex:page standardController=”MYControllerName” Controller=”MyController”> Wrong
- [adinserter block='9']
-
Hi Anjali,
A custom and standard controller cannot be referenced in the same page. Another way is you use extensions instead of Custom Controller.
-
No a custom and standard controller cannot be referenced on the same page. A custom and standard controller should not be supported at the same time; another way is you can use extensions instead of Custom Controller.
Ex- <apex:page standardcontroller=”” extensions=”controller name”/>
Log In to reply.