How to create Salesforce Visualforce page.

To create Salesforce Visulforce page,  navigate to Developer console. Salesforce VF pages can be created and edited using Salesforce developer console and from Pages. Salesforce Developer console has powerful development tools like syntax highlighting, tag pair matching, auto suggest, smart indenting and auto complete. To create Salesforce Visualforce page using developer console follow the steps given below.

  1. Open Developer console under your name or quick access menu.
Salesforce Developer Console
  1. Now developer Console will be opened in New window.
  2. To create VF page clickFile | New | Visualforce page.
Hello world Visualforce page
    <h1>Hello World</h1> 
  • Now toFile | Click on save button.
  • Now click on preview button to see you new Vf page.

Creating Salesforce Visualforce pages through pages.

This is another process of creating Salesforce Visualforce pages. To create Visualforce page navigate toDevelop | Visualforce Pages.

create Salesforce Visualforce page
  • Click on New button to create Visualforce page.
  • Enter label and Name.
  • Finally click on save button.
create Salesforce Visualforce page

Creating Salesforce Visualforce pages from URL

This is the third method for creating Visualforce page. As shown in above steps, to create VF page must navigate toSetup | Build | Develop | pages orDeveloper console every time. To create Visualforce page directly from URL, click on the URL and add/apex/pages at the end of the Salesforce URL as shown below.

Creating Salesforce Visualforce pages from URL
  • Click oncreatepage Vftestpage to create new Vf page in Salesforce.
  • To check the created visualforce page navigate toBuild | Develop | Visualforce. Here list of all Vf pages in Salesforce will be displayed.

Visualforce pages can be used in different ways in Salesforce organisation. Some of them are

  • VF pages can be used by overriding the standard button.
  • VF page can be called using the custom help links for the custom object.
  • Creating JavaScript button to open VF page.
  • Creating custom buttons to open VF page.
  • Vf pages can be added to custom tabs, dashboards and page layouts.