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
crocodilecrocodile 

Error: A custom and standard controller cannot be referenced in the same page

Hi,

Before asking my question plz clarify:

UI behavior and Controlling behavior are not the same right?

 

I assumed both are not same.

I have a Custom Object: MyObj and an Apex Class: MyClass.

 

Now am trying to create a VF page with MyObj UI behavior and MyClass Controlling behavior. The code is:

 

 

<apex:page standardController="MyObj__c" controller=" MyClass">
</apex:page>
But getting an error: Error: A custom and standard controller cannot be referenced in the same page
Why can't I use both Controllers in VF page?

Thx in adv,
VNath

 

 

 

gtuerkgtuerk

Change 'controller="className"' to extensions="className".  then you can use both

b-Forceb-Force

we cant use StandardController and Controller for same page , you need to use extension controller

 

Thanks,

Bala