+ Start a Discussion
Sean Fife 9Sean Fife 9 

View default page layout for overridden layout

I have an object with an overridden tab that goes to a visualforce page, instead of the standard layout.  Is there a way for me to view the default page layout without changing the view for everyone?  Meaning, let everyone see the visualforce page that's there now, but let me go to some URL that shows me the default page layout?  Not like a permanent change for me myself, but in the off chance I want to see it. For example, sometimes I want to see some related lists that aren't on the visualforce page for debugging or whatnot.
Pankaj PPankaj P
As per my understanding of your question,
You have an Object let say Department__c and the New Button for that is overidden to a VF page let say Showdepartments.page , and here you want that page to behave user specific, so if you are the User you should be shown another VF page or may be standard layout.

Here is sample code that you can use in your first VF page to get behavioural redirection according to the Current User.

Showdepartments.page : VF page
<apex:page standardController="Department__c" extensions="ShowDepartments" action="{!verifyRedirection}">
    other VF code here

Showdepartments.class : Controller class
public with sharing class Showdepartments {
    // Constructor
    public Showdepartments(ApexPages.StandardController controller) {

    public PageReference verifyRedirection() {
        User user1 = [ Select Id, Name FROM User where Id= : UserInfo.getUserId()];
        if(user1.Name = 'Sean Fife 9') {
            // redirect to another VF page
            return System.Page.anotherVFPage;
            // redirect to any particular record detail page
            return new PageReference('/' + anySalesforceObjectRecordId);
        } else {
            return null;

Hope this will help you in some or the other way. :)