Newer Version Available

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

Try It Out: Create a Visualforce Page

Now that we're in development mode, let's create a Visualforce page called CandidateMap by simply modifying the URL in our browser.

Salesforce URLs typically look something like this: https://yourDomain.my.salesforce.com/001/o, where yourDomain is the name of your Salesforce custom domain. You can create a new Visualforce page by removing everything to the right of the .my.salesforce.com/ part of the URL and replacing it with apex/ followed by the name of the page you want to create.
  1. In the address bar of your browser, replace everything to the right of salesforce.com/ with apex/CandidateMap.

    Don't change anything to the left of salesforce.com/, as this information is specific to the instance of the Force.com platform that you're using, and changing it will prevent you from creating the Visualforce page.

    Warning

The resulting URL should look something like this: https://yourDomain.my.salesforce.com/apex/CandidateMap.

  1. Press Enter.

The following Visualforce error page appears indicating that the page doesn't exist yet. Again, that's okay—this gives us a chance to exercise one of the other handy features of development mode, the quick fix. A quick fix is a way of creating something on the fly, right when we need it. In this case, even though the CandidateMap page doesn't exist yet, development mode gives us a quick fix link to create it on the fly. Clicking the link is the equivalent of going to Setup, navigating to the Visualforce page section, clicking New, entering the name of the page, and clicking Save.

Visualforce Error Page A Visualforce error page stating, "PageCandidateMap does not exist."
  1. Click the Create Page CandidateMap link.
CandidateMap Visualforce Page The CandidateMap Visualforce page

Congratulations! You've created your first Visualforce page! Now it's time to add some Visualforce markup so it displays our candidate map.