+ Start a Discussion
Tushar SethTushar Seth 

Base Class Object of all Standard Controller

Hello Friends,

I want to know about Base Class of all standard controller class that can help me to put my single Embedded VF Page in any Object of that Org.


I am working on a project which required single VisualForce Page and single Controller, that can be Embedded in any Object  of that Org.


I am able to create single controller but unable to create single VF Embedded Page for all Object in an Org


For VF Embedded Page <apex:page block required standardController attribute to make Page to be visible in Edit Layout of that object


Your Assistance will make me to work fwd.




Afzal MohammadAfzal Mohammad

Am afraid its not possible.


However, if you can explain what that VF page will do? then, probably I may be able to help you.



Cory CowgillCory Cowgill

You can leverage Dynamic SOQL, Metadata API to achieve alot of functionality to make a reusable VF Page for different objects at runtime. There are some limitations.


For starters, take a look at my blog post about Dynamic SOQL here which has example code: http://corycowgill.blogspot.com/2011/01/building-dynamic-soql-select-all-query.html


Also read up on the Dynamic SOQL features in Force.com Developer Guide.

Cory CowgillCory Cowgill

Sorry, I see you want to Embed StandardController dynaimcally at runtiime. You won't be able to do that like previous poster said. You can't change that at runtime as previous poster said. :(


Echoing the you won't be able to do that.


What you could do is create a single page component, and then reference that same component in each VF page that you create for each object.


That would allow you to centralize your code in one place isntead of having tons of copies for all the objects.