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
AHAMMEDAHAMMED 

How To display number of records

Hi

How to display number of records display to selcted object in visual force
sandeep sankhlasandeep sankhla
Hi SHAIK,

You can simply do aggregate queriy adn count you can display...

Select Count(Id) from Account(Selected Object)

Thanks
Sandeep
shiva pendemshiva pendem
Hi Shaik ,

Use <apex:variable > component in vf page place this inside a table,

Ex :
<apex:variable value="Cnt" var="c"/>
<apex:datatble-----------------/>
<apex:column/>
<apex:variable value="{!cnt+1}" var="c1"/> //increments cnt value for Every record by one 
</apex:datatable>
<apex:outputlabel value="{!c1}">
SantoshChitalkarSantoshChitalkar
1) OnSelect call controller method and pass the selected object.
2) Use Count Query and store the count in variable.
3) bind this variable with Visualforce page