Book Image

Learning Apex Programming

Book Image

Learning Apex Programming

Overview of this book

Table of Contents (17 chapters)
Learning Apex Programming
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Taking control


In order for your Visualforce pages to be able to interact with your data or code, the pages must have a controller specified. A controller is a class that defines the variables and methods available to the page. There are two types of controllers: custom ones that you create and standard ones that are built in. The Salesforce1 Platform automatically includes a standard controller for every standard sObject built in to the platform. However, the brilliant minds at Salsesforce.com didn't stop there. As soon as you create a new custom sObject, the platform automatically generates a standard controller for that sObject. These standard controllers include the ability to access fields on a record, all related lists on a record, and even fields on related records. They also include the actions behind the standard buttons you would see when viewing or editing a record. As you modify the fields on an sObject, its standard controller is automatically updated too. It's like having a...