function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
hi,
I am new to salesforce. please help me out in this ..
how to get field values into a list and and display it into a visualforce page?
thanks,
-shravan
Hi,
Follow the procedure below to get field values in a list and displaying them in the visualforce page:
lstAcc = [Select Id, Name, Industry From Account where Id=: put your account Id here limit 1000];
Then in the class,
public String accName{get;set;} // decalaration of property
if(!lstAcc.isEmpty())
{
for(Account acc: lstAcc)
if(acc.Name != null && acc.Name != '')
accName = acc.Name;
}
Hope this is what you were looking for.
thanks a lot for clear explanatio about lists.
thanks rmeh
Hi,
Follow the procedure below to get field values in a list and displaying them in the visualforce page:
lstAcc = [Select Id, Name, Industry From Account where Id=: put your account Id here limit 1000];
Then in the class,
public String accName{get;set;} // decalaration of property
if(!lstAcc.isEmpty())
{
for(Account acc: lstAcc)
{
if(acc.Name != null && acc.Name != '')
{
accName = acc.Name;
}
}
}
Hope this is what you were looking for.
All Answers
Hi,
Follow the procedure below to get field values in a list and displaying them in the visualforce page:
lstAcc = [Select Id, Name, Industry From Account where Id=: put your account Id here limit 1000];
Then in the class,
public String accName{get;set;} // decalaration of property
if(!lstAcc.isEmpty())
{
for(Account acc: lstAcc)
{
if(acc.Name != null && acc.Name != '')
{
accName = acc.Name;
}
}
}
Hope this is what you were looking for.
thanks a lot for clear explanatio about lists.
thanks rmeh