0

As far as I know, a visual force page is tied to only one SObject by declaring

<apex:page standardController="Case">

</apex:page>

Is there any way for a visual force page to be dynamic and then display it in page layout for both Account and Case?

2
  • A visualforce page doesn't need to use a standard controller, you can have a custom controller and handle any object(s) you like. – Doug B Jun 15 '15 at 9:14
  • Hi Doug, correct me if Im wrong, but according to this, in order to embed a visual force page into page layout, it must use standard controller tag. – ben Jun 15 '15 at 9:22
1

Unfortunately, the answer is No. If we need to have the visualforce page on a object's pagelayout, we would need to associate the standard controller of the page to the same object. That too, we would need to hardcode the standard controller in the quotes as you have done it in your code.

There is no way to even dynamically reference the standard controller. You may refer to the below links which are similar to your requirements.

Add Visualforce component to any page layout?

Is there a way to have the standard controller dynamic in Vf page

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.