I have some very strange behavior on a newly created Visualforce Page that is embedded in a standard layout. Custom buttons for that page will appear directly beneath it and the Related Lists will appear below it (even if this embedded Visualforce page is at the top of the layout). When collapsing the Section block it will also hide the custom buttons

To help explain and illustrate the issue I have a few screenshots:

What the page appears in the Layout: enter image description here

What the page looks like on its own:

Standalone Layout

What the editor looks like: page editor

Visualforce Page:

<apex:page standardcontroller="Case" label="Should I Give Support?" extensions="Membership_Should_I_Support_Controller" showHeader="false" standardStylesheets="true">
    <apex:outputPanel rendered="{!all_okay==false}">
        <!-- Mostly standard HTML -->
    <apex:outputPanel rendered="{!all_okay==true}">
        <!-- Mostly standard HTML -->
  • Did you mean to include the buttons in your VF page sample above? – Andrew Fawcett Nov 8 '13 at 7:00
  • Where are the Open Case, Reschedule Case and Survey buttons defined? Can you show a screen shot of the layout editor for the object. Sorry I'm a little confused now as to where these buttons are coming from. It would help to know a little more. Thanks. – Andrew Fawcett Nov 9 '13 at 10:06
  • The buttons are only defined in the case layout (where else can you put "custom buttons" outside of a VF page?). I edited the initial post with a screenshot of the editor – Mattisdada Nov 11 '13 at 22:33
  • No other place than on a layout, its news to me how these buttons have moved from their usual place? Very interesting! Is the example screenshot from the Case detail page then? Can you include the full screenshot.... – Andrew Fawcett Nov 11 '13 at 22:35
  • I included a full screenshot of the Case layout page now. I've never really seen this behavior before in SF. – Mattisdada Nov 11 '13 at 22:41

When embedding Visualforce pages in layouts the whole page, including everything on it is displayed in that section of the layout. The platform does not attempt to lift any buttons you have placed on the out and display them alongside the other buttons on the layout.

Hence your buttons just appear in that section and disappear when you collapse that section. To add buttons to layouts you need to create a Custom Button and drag that onto the buttons section of the layout. This blog provides another resource describing how to create such buttons with Apex.

Update: 11th Nov

I must admit I'm starting to think the buttons your seeing are some kind of bug or hidden feature to render custom buttons on the section or somehow in the VF page? I've created a VF page for Case, put it on a layout with a custom button of my own and i don't see it replicated below the VF page layout section.

Ah....I've just spotted something on your layout designer..... it says "Should I give support? [BETA]", so this looks like some kind of new Case layout feature perhaps? Can you try creating a new section on your layout instead of using this section?

enter image description here

  • The custom buttons appear at the top of page like they are supposed to, they are not meant to appear on the embedded visual force on the same standard object – Mattisdada Nov 9 '13 at 7:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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