Monday, April 21, 2014

What is Standard List controller in Salesforce?

What is Standard List controller in Salesforce?

Or

What is Standard List controller in Visuaforce?


Standard list controllers allow you to create Visualforce pages that can display or act on a set of records. Examples of  work with a set of records include list pages, related lists, and mass action pages. Standard list controllers can be used with the following objects:



• Account

• Asset
• Campaign
• Case
• Contact
• Contract
• Idea
• Lead
• Opportunity
• Order
• Product2
• Solution
• User
• Custom objects


For example, to associate a page with the standard list controller for accounts, use the following markup:

<apex:page standardController="Account" recordSetVar="accounts">

The recordSetVar attribute not only indicates that the page uses a list controller, it can indicates the variable name of the record collection. This variable can be used to access data in the record collection

Accessing Data with List Controllers

<apex:page standardController="Account" recordSetVar="accounts" tabstyle="account"
sidebar="false">
<apex:pageBlock >
<apex:pageBlockTable value="{!accounts}" var="a">
<apex:column value="{!a.name}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>


This results in a page that lists all the account names in your organization:







That's it !!!..




3 comments:

Unknown said...

Cloud is one of the tremendous technology that any company in this world would rely on(Salesforce Training in Chennai). Using this technology many tough tasks can be accomplished easily in no time. Your content are also explaining the same(Salesforce admin training in chennai). Thanks for sharing this in here. You are running a great blog, keep up this good work(hadoop training in chennai).

Unknown said...

good

mono said...

Good post. I find out something new and difficult on personal blogs I stumbleupon each day. It's always helpful to read content from their writers and practice a little something from their internet sites.

Dietplanpdf.com
Ketosidedishes.com

Post a Comment

 
| ,