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

Urgent:displaying another custom object records in vf page.

Hi All,

     i want to display the pick list in vf page.In that pick list i want to display the another custom object records.Its urgent.Any one can u please help me this.


Thanks in advance.



try this it might be helps you

public class pickvalues
Public String str{get;set;}
public list<selectOption> getpickvalue()
public List<SelectOption> opp=new List<SelectOption>();
opp.add(new SelectOption('',--none--);
for(Account Ac:[select id,name from Account])
opp.add(new SelectOption(,;
return opp;

<apex:Page controller="pickvalues">
	<apex:outputLabel value="Account Records" for="mgr"></apex:outputLabel>
					<apex:selectList id="mgr" value="{!str}" size="1" title="Manager">
						<apex:selectOptions value="{!pickvalue}">