Salesforce Dictionary — Free Salesforce GlossarySalesforce Dictionary

Apex Page

Development🟢 Beginner

Definition

An Apex Page (more commonly known as a Visualforce Page) is a page built using Visualforce markup that can include HTML, CSS, JavaScript, and Visualforce component tags. Apex Pages use a tag-based syntax similar to HTML and are rendered by the Salesforce platform. They can reference Apex controllers to display dynamic data and handle user interactions.

Real-World Example

a Salesforce developer at CodeBridge recently implemented Apex Page to create a robust integration between Salesforce and an external system. Using Apex Page, the developer builds an efficient solution that syncs data in near real-time, handles error scenarios gracefully, and includes detailed logging for troubleshooting.

Why Apex Page Matters

Apex Page is the technical name for a Visualforce page in the Salesforce metadata model; in Setup you'll find them under 'Visualforce Pages' but the underlying metadata type is ApexPage. A page is written using a tag-based syntax that mixes standard HTML, CSS, JavaScript, and Visualforce-specific tags like apex:outputField, apex:inputText, and apex:commandButton. Pages can reference Apex controllers to display dynamic data, handle form submissions, and execute business logic on the server.

Visualforce was the primary UI framework in Salesforce for years before Lightning Web Components took over. Most new development today uses LWC, but Visualforce pages still run in Lightning Experience (rendered inside an iframe), and many orgs maintain a mix of legacy Visualforce and modern LWC code. Knowing how Apex Pages work is important for maintaining existing orgs even if new work is done in LWC.

How Organizations Use Apex Page

  • CodeBridgeMaintains a suite of Visualforce pages that handle complex PDF generation using apex:page renderAs='pdf'. LWC doesn't have an equivalent built-in PDF rendering capability, so these Visualforce pages continue to serve that purpose.
  • Oceanic CorpUses a Visualforce page embedded in a Lightning page to display a custom data entry wizard that was built before LWC was widely adopted. The page still works fine and hasn't been prioritized for rewrite because the business value of migrating is low.
  • TerraForm TechWrote a Visualforce page that renders an HTML-formatted email template with dynamic merge fields. The page is invoked from a custom button and generates a branded email preview before the user clicks send.

🧠 Test Your Knowledge

1. What is another name for an Apex Page?

2. What syntax does an Apex Page use?

3. What is the recommended modern alternative to Visualforce for new UI development?

See something that could be improved?

Suggest an Edit