Introduction to Visualforce

20
Introduction to Visualforce Ralph Eddy – Sales Engineer Henry Liu – Sales Engineer

description

Force.com can automatically generate user interfaces, but in some cases you might want to build a more custom UI. Join us to learn about Visualforce, the component-based UI framework that lets you build attractive, dynamic, reusable user interfaces. We'll cover code walk-throughs, common use cases, leveraging Apex on the server side, debugging techniques, and how to utilize the component framework to make your code portable and maintainable.

Transcript of Introduction to Visualforce

Page 1: Introduction to Visualforce

Introduction to Visualforce

Ralph Eddy – Sales EngineerHenry Liu – Sales Engineer

Page 2: Introduction to Visualforce

Safe HarborSafe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.

Page 3: Introduction to Visualforce
Page 4: Introduction to Visualforce
Page 5: Introduction to Visualforce
Page 6: Introduction to Visualforce
Page 7: Introduction to Visualforce
Page 8: Introduction to Visualforce
Page 9: Introduction to Visualforce
Page 10: Introduction to Visualforce
Page 11: Introduction to Visualforce
Page 12: Introduction to Visualforce
Page 13: Introduction to Visualforce

What You Will Learn TodayWhat is Visualforce and how is it used.

▪ ExamplesDeveloping in visualforce.

▪ We are going to build a page that allows you to Nominate Contacts for a Conference▪ We evolve this page from

• a simplelist• to an enterable list• make it searchable• show it on an Account page• Give it a modern responsive design• Make it mobile

How to get Started.

Page 14: Introduction to Visualforce

Outline, Agenda, Introduction, ExamplesAgenda - 5

▪ Show in VF TabIntroduction - 5

▪ When to Use Visualforce▪ Our story is around Managing Conferences

Examples of how Visualforce is used - 5▪ Custom Tab – you already saw the Agenda▪ Custom Tab in a User’s Profile▪ Inline on a Detail page

• Banner on Conference• Google Map• SAP Data

▪ Global Action• Add Attendee

▪ Mobile• Add Attendee and other apps

These slides are not to be presented. Rather, this is the outline of what they are presenting, since they do not intend to have slides.

Page 15: Introduction to Visualforce

Create a List of ContactsGoal: We want to create a page that list contacts and makes it very easy to recommend them to attend a Conference.

Create a Visualforce Page – in Setup - 3Turn on Development Mode• View page using /apex/{pagename}

<apex:pageblock> - 3<apex:pageSection>Component Reference for quick Help

Add a banner to the top of the page - 3• Upload an image to resources• <apex:image>

So far this page is static – le’s add some data

Add a controller - 5• LIST<contact>• [SELECT]<apex: pageBlockTable>• <apex:outputField> : First, last, phone, email

Make it a Tab - 3ShowHeader=“false”

Page 16: Introduction to Visualforce

Make the List Enterable & SearchableMake list Enterable - 5

▪ Add to query in controller (type an error)▪ <apex:inputField> Contact.Nominate_For__c : exec, regular, no▪ Make Email enterable as well

• Show validation (how?)

Controller add Save method: update list<apex:commandButton> Save

▪ Save gets error – add <apex:form>

Update and show data on Contact record.

Add Search – Last name - 5▪ Add method to Controller

• Show data validation in Apex when save select▪ Add Search to Page

Do a search

Page 17: Introduction to Visualforce

Show List on Account, Responsive, MobileAdd page to Account (use a copy of the page) - 5

▪ /apex/ContactsOnAccount – creates a new page• Use the same controller

▪ standardController▪ New constructor method where Search uses id▪ Remove search and banner

Drag Visualforce onto Account recordUpdate Contacts

Replace Visualforce Markup with Responsive Design - 5▪ Do this in a copy of the page, reference the same controller

Show page in a Mobile device - 5▪ Add “page” record in QW demo.

Page 18: Introduction to Visualforce

Sandbox, Dev Tools, Rich Examples, Getting StartedTo do this in production you must develop in a Sandbox and promote to Production

▪ Apex code must have a test class

Developing in other tools▪ Eclipse▪ Sublime

Additional Examples of full Websites▪ Demo Booth signup▪ AppExchange

How to Get Started Resources▪ Developer.force.com▪ Visualforce documentation▪ Youtube▪ Discussion Boards

What we Showed You

Page 19: Introduction to Visualforce

We want to hear from YOU!

Please take a moment to complete our session survey

Surveys can be found in the “My Agenda” portion of the Dreamforce app

Page 20: Introduction to Visualforce