I'm thinking to write a dynamic vf page which will override the object Tab(Account). So how to know the object name in apex class. Once I got the object name then I will then i will perform remaining tasks.

<apex:page controller="controllerOverrideTab" showHeader="true" standardStylesheets="true" 
       sidebar="true" applyHtmlTag="true" applyBodyTag="true" docType="html-5.0" >
---custom code

not using standardController. I need to override the Account's or opportunity's tab page. so I'm thinking to use dynamic vf page and controller.

closed as unclear what you're asking by David Reed, Jayant Das, Reshma, Pranay Jaiswal, Derek F Feb 25 at 12:36

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


You can determine the object from the StandardController.

public MyPageController(ApexPages.StandardController controller) {
  SobjectType objType = controller.getRecord().getSobjectType();
  // You can describe using the objType object to get object and field information

Read more about it in the StandardController and sObjecctType class, as well as the related describe calls.

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