Thursday 6 September 2012

Embed a Page on a Standard Layout - Visualforce

Another way to get your page displayed is to embed it within a standard layout for another page. For example, imagine your accountDisplay showed an interesting analysis of the account data, and you wanted to embed it within the standard account detail view.
  1. Click Setup | Customize | Accounts | Page Layouts.
  2. Click Edit next to Account Layout.
  3. Select Visualforce Pages in the left column of the user interface elements palette.
  4. You’ll notice your page appears here (because it uses the Accounts standard controller).
  5. Select accountDisplay, and drag it to the Account Information panel.
  6. Click Save.
  7. To see this in action, select the Accounts tab and then choose an account. You’ll notice the standard display of data, with your Visualforce page embedded within it! Your embedded page ideally needs to accommodate the inline display, so it might look a little plain right now, but notice how the embedded page automatically shows data of the same record—it’s also being passed the ID parameter.

No comments:

Post a Comment