A nice feature of S-Controls is the ability to easily embed them into a page layout. Did you know that you can do the same thing with Visualforce Pages?

I was talking with a partner yesterday and they wanted to add some Visualforce functionality to a page layout. To achieve this, they re-created the whole detail page in Visualforce and then proceeded to add additional Visualforce functionality. This approach works, but when it comes time for the user to customize this page, they better be familiar with your Visualforce code.

A recommended suggestion is to continue to use the default page layout and simply drag-and-drop your Visualforce page into the desired section when editing the page layout (see image).


You must be sure the standard controller is set to the object you want to customize. So if you want to add the Visualforce page to the Account layout, you need your Visualforce page to begin with:

<apex:page standardController="Account">

The benefits are twofold:

  1. As a developer, you can leverage the existing page builder and easily add new Visualforce functionality on top
  2. For your customers, they can easily customize the page while still utilizing the Visualforce enhancements you added

tagged , Bookmark the permalink. Trackbacks are closed, but you can post a comment.
  • JustinC

    This is great – but isn’t there an issue if you want to have links inside this visualforce page? Since visualforce pages are served off of a different domain as the main content, aren’t you limited by cross-site scripting security? I believe you are limited when using code like “parent.location.href” to redirect the user to another page. I believe it’s most apparent when trying to open pages from within the visualforce “page” when embedded into a page layout and in the console.

  • http://developer.force.com/ Andrew Waite

    The issue with separate domains is that any script in the Visualforce page will be blocked from accessing the DOM of the containing, standard salesforce page.
    If you want to simply include hyperlinks in the inlined Visualforce page you can simply use the target attribute on your link tag and provide a value of “_top”. This will prevent loading within the iframe. When you are in the service and support console this will “bust” you out of the console which is probably not what you want.
    There is currently no solution for iframing visualforce pages within a standard page that is itself in an iframe. The service and support console is the only such standard salesforce UI that is affected by this.

  • http://twitter.com/jcoudriet Jason Coudriet

    If your using custom objects, you will need to reference based on the API Name. For example Effort would be Effort__c.