Skip to main content
replaced http://salesforce.stackexchange.com/ with https://salesforce.stackexchange.com/
Source Link

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?Add Visualforce component to any page layout?

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

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

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

Source Link
Karthik
  • 193
  • 2
  • 11

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