Starting from the very basics this course leads the viewer through the process of building advanced custom pages for their Salesforce.com org. Extensively covering standard controller functionality this contains must-know information for those who want to get the most out of the platform, building reliable pages quickly.
Matt is a software engineer, developer, and hacker with experience in various industries and technologies. He is currently working on the Force.com platform. He has a passion for building applications and helping people change their processes to adapt to the new world of PaaS. Matt is a Salesforce.com MVP.
Section Introduction Transcripts
Section Introduction Transcripts
Visualforce Basics OK, so now we know what Visualforce is, and what it's for. And we also know how to make new Visualforce pages inside our Salesforce _____. The next step is to look at how Visualforce works, and how we can actually use it to build useful pages for our users. The first thing we're going to cover in this module is the use of standard controllers. These are a standard part of the system, and they're used to provide data for pages, as well as handle user interactions. We're going to look at the merge syntax we use to reference data, and we're going look at how we use page parameters to specify records. When reviewing a page, we need to tell the page which record we want to display. We'll also take a look at the standard Visualforce page structure. Pages are built up primarily of three main blocks. At the top we have Apex:PageBlock, inside those Apex:PageBlockSection, and inside those Apex:PageBlockSectionItems. Using these components, we can mimic the standard UI of Salesforce to make sure our users feel at home. We'll look at customizing outputs of the users using Apex:OutputField to display field data on the screen. We'll look at basic text formatting, and we'll also take a look at field sets as they're a very handy way of building dynamic pages which administrators can work with later on. We'll look at some of the standard input fields, including Apex:InputField. We'll also look at supporting user interaction using elements such as Apex:CommandButton, and also relaying information back to the user about their interactions using warning and error messages.
Working With More Data OK, so now you've completed the first module on Visualforce. You may have noticed while following the module that we were only ever working with a single record at a time. We were either viewing a single record or editing a single record. We were never dealing with multiple. This module is entitled "Working With More Data", and that is because we'll be looking at how we can work with more than one record at a time. The first thing we're going to take a look at is standard list controllers. These are part of the standard controllers themselves, and they give us the ability to both view and edit multiple records at once. To enable us to achieve our goals, we'll be looking at the various techniques for displaying multiple records. First we'll take a look at apex:dataList, and then we'll have a look at apex:pageBlockTable. We'll consider apex:dataTable, but these are essentially the same thing, as we will see. We'll have a look at leveraging existing list views to filter the records we display to the user. You'll be familiar with list views whenever you view a standard tab in the Salesforce UI. For example, if you go to Accounts, you'll see a list of recent accounts. And then you can drill down from there to another view where you see all accounts, or you get to choose from a list of views, either ones that you've defined for yourself, or ones that your system administrator has defined for you. We'll take a look at working with related objects and how that works with Visualforce. You'll be aware of relationships already. They are the lookup fields you have between objects. So contacts have a lookup to accounts. That means contacts are related to an account. And finally we'll take a look at mass updating records. This is updating many records at the same time so that they all have the same value or values in as many fields as we wish to synchronize.
Customised Look And Feel This next module is called Customised Look and Feel. And it's divided really into two main parts. Part of it is looking at how we can change how our pages look, and by feel I mean we're going to look at how the user interacts with our pages, and how, with a few small changes, we can make our pages much more pleasant to work with. So the very first thing we're going to look at is how we can control rendering using logical expressions. We'll look at how this conditional rendering works. And we'll have a quick overview of some Visualforce functions. And these are what we use in our expressions to determine if an item should be rendered on the page. We're also going to take a look at re-rendering. That is, updating specific parts of the page, instead of updating the entire page every time a user performs an action. In addition to this, we'll look at displaying busy indicators when actions are taking place. This is pretty important to let the user know that something's happening, as it's not always that obvious. When it comes to the look part of look and feel, there's several things we can do with our Visualforce pages that change the look quite dramatically. The first is disabling the header and the sidebar. We'll look at disabling the standard stylesheets and replacing them with custom stylesheets. And we'll even look at how we generate PDFs. Last but not least, we'll take a look at using static resources. Static resources are a way by which we can load media into Salesforce, and then use it in our pages.