Newer Version Available

This content describes an older version of this product. View Latest

Canvas Apps and Visualforce Pages

In addition to standard canvas apps, Canvas also lets you expose a canvas app on a Visualforce page. This means you can display a canvas app anywhere you can display a Visualforce page.

Developers can use Visualforce pages to:
  • Override standard buttons, such as the New button for accounts, or the Save button for contacts
  • Override tab overview pages, such as the Accounts tab home page
  • Define custom tabs
  • Embed components in detail page layouts
  • Create dashboard components or custom help pages
  • Customize, extend, or integrate the sidebars in the Salesforce Console (custom console components)

To host a canvas app on a Visualforce page, use the <apex:canvasApp> component.

The Canvas framework includes methods that you can use to circumvent the navigational limitations of the iframe that contains a canvas app, without using Visualforce pages. These methods offer a streamlined alternative for controlling navigation to or from canvas apps in the Salesforce app. For details, see Salesforce Mobile App Navigation Methods for Use with Canvas Apps.

Note

Known Limitations

Canvas apps embedded in Visualforce using <apex:canvasApp> serialize parameters as part of a redirect URL during load. If the combined size of parameters exceeds 8KB, this may cause the redirect to fail with a 500 Internal Server Error. This is due to a header size limit.

To avoid the header size limit issue:

  • Pass only small tokens or ID's via parameters.
  • Let your Canvas app fetch large payloads server-side.
  • Consider using signedRequest mode, which avoids redirects and uses POSTS.