When your Visualforce pages interact with other pages in your application, you can automatically pass in the record’s identifier, and your Visualforce page can then display that data. Right now your pages are stand-alone, so for your page to display data from a record in the database, it needs to know the record’s identifier.
Your Developer Edition environment has a number of objects that store data, available out of the box.
- For example, switch to the Sales application by choosing Sales from the drop down.
- Now select the Accounts tab. Ensure the pick list shows All Accounts and click Go to view all the account records.
- Click Burlington Textiles (or any other record) to view the details. Your screen displays all the details for that account:
Notice that your URL has changed—it now looks something like this: https://<your salesforce instance>.salesforce.com/0018000000MDfn1
The identifier is that series of digits at the end, in this case, 0018000000MDfn1. The identifier, or ID as it’s often written, is unique across all records in your database. If you know the ID for any record, and have permission, you can often construct a URL to view it by replacing 0018000000MDfn1 with the record’s identifier.
When you visited https://<salesforce instance>.salesforce.com/0018000000MDfn1, Force.com automatically retrieved the record with identifier 0018000000MDfn1 from the database, and automatically constructed a user interface for it. In the other lessons in this tutorial, you’re going to take away some of the automation, and create your own user interface.
No comments:
Post a Comment