function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
abivenkatabivenkat 

Get all the Fields and its Field values from a Object - Need Clarification

 

hi all,

 

I need all the Fields (Column Names) and its Field Values of a record from an object. Is it possible to retrieve the column names and its corresponding values for multiple records and display it in a table in my visualforce page? 

 

i wanna display the column names on the first column of the table and 1st records values in 2nd column (values must be displayed to the corresponding to the column name in 2nd column) and 2nd records values in 3rd column and 3rd in 4th column. so totally four columns. how to do this, is this possible to do using visualforce page?? please help me as i am new to sfdc.. thanks in advance...

 

thanks,

abivenkat,

SFDC Learner

ram1234ram1234

by using this code u can retrieve records from any object

 

VF PAGE:

 

<apex:page sidebar="false" standardController="account" recordSetVar="records">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:pageBlockTable value="{!records}" var="r">
<apex:column headerValue="Name">
{!r.Name}
</apex:column>
<apex:column headerValue="city">
{!r.Phone}
</apex:column>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

 

===============================================

 

Regards, 

 

ram.