+ Start a Discussion
Akash Diwan.ax1657Akash Diwan.ax1657 

Get List of all Contacts form Contacts tab

How do i retrieve a list of all contacts available in my contacts tab and display them on a Visualforce page.

avijchakavijchak

List<Contact> CONTACTLIST  = [SELECT ID,NAME FROM CONTACT WHERE OwnerId = : USERINFO.GETUSERID()];

 

@vijit Capgemi Developer

 

 

ShahTheTrainerShahTheTrainer
<apex:page standardController="Contact" recordSetVar="ContactItems">
	<apex:pageBlock>
		<apex:pageBlockTable value="{!ContactItems}" var="C">
			<apex:column value="{!C.Name}" />
			<apex:column value="" />
			<apex:column value="" />
			<apex:column value="" />
		</apex:pageBlockTable>
	</apex:pageBlock>
</apex:page>

 to display ALL contacts.  Fill the value attribute with the fields you required to display in the visualforce page