Example: I have created New Case visualforce page for external users. After they create a case using this New Case page and try to edit the case, it displays the standard page layout in edit view. I want to be able to override this standard layout page and render a page that is exactly like my New case page. I cant customize the case Edit button as this will enforce my visualforce page for all users. I only want to render my visualforce Edit page for external users. Thanks.


1 Answer 1


yes it is.

go to Case --> buttons, link, Actions then find the Label "edit" and select the action edit. .. then you can override the std page with that vf one.

Now, say if you want to choose between a std page and the vf page? What you'd do is create a routing VF page. So, when the user clicks edit, he goes to the router. based on what ever criteria (i.e. ecternal user / internal user), he'll get sent to where he needs to go.


if you need any paramaters from your previous page, you can get those via a referring page. you can make this call in your constructor to build your retURL for a cancel action, or if you need the referrinf record in any way

 //vf page
apex:page action={!router}>

 // in  controller

public pagerefernce getRouter()
    PageReference p ;   
    if ($UserInfo.getProfileId == '') <-- external profile{
        p = new PageReference(/apex/YourVFPage);
        p = new PageReference('/'+this.case.id+ '/e?nooveride=1'
    return p;
  • Can you add how to route to the standard (layout-based) page?
    – Keith C
    Mar 14, 2014 at 16:26
  • updated... that's the idea. Mar 14, 2014 at 17:57
  • 1
    ... in my experience you also need nooverride=1 to avoid just ending up in an infinite loop. Or am I missing something here?
    – Keith C
    Mar 14, 2014 at 18:02
  • you're right, he's need that for the std page redirect. i thinks? I updated the code.. Mar 15, 2014 at 20:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .