You need to sign in to do that
Don't have an account?
himanshu huske 7
visualforce task
Write a program to display array of account object record - VFpage + controller code
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Hello himanshu,
Please try this code. You can use the standard controller to display the records in your visualforce page.
I hope it helps you.
Kindly let me know if it helps you and please mark as Best Answer.
Thanks and Regards,
Biswojeet,
Please follow the below code and link with the help of this code and links you can solve your problem, it may be helpful to you.
Apex Controller:
public with sharing class StandardAccountDisplayController{
public List<Account> records {get; set;}
public StandardAccountDisplayController(){
records = [select Name, AccountNumber from Account];
}
}
Visualforce Page:
<apex:page controller="StandardAccountDisplayController">
<apex:pageBlock title="Account List">
<apex:pageBlockTable value="{!records}" var="record">
<apex:column >
<apex:facet name="header">Account Name</apex:facet>
<apex:outputText value="{!record.Name}"/>
</apex:column>
<apex:column >
<apex:facet name="header">Account Number</apex:facet>
<apex:outputText value="{!record.AccountNumber}"/>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
Link: https://developer.salesforce.com/forums/?id=9060G000000I5quQAC
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
Try below code: I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi