In my Magento customer have 4.0 laksh records,i want to list the all customer in custom admin form select field
Field
$fieldset->addField('user_id', 'select', array(
'type' => 'int',
'label' => Mage::helper('catalog')->__('Lawyer'),
'class' => 'required-entry',
'required' => false,
'name' => 'user_id',
'values' =>$this->LawyerCollection(),
));
My Query:
public function LawyerCollection() {
$collection = Mage::getModel('customer/customer')->getCollection()->addAttributeToSelect('firstname')->addAttributeToFilter('group_id',array('eq'=>5));
$user = array();
if($collection->getSize()) {
foreach($collection as $_collection) {
$user[$_collection->getId()] = $_collection->getFirstname();
}
}
return $user
}
But the result is an empty page, i hope this is because of the 4.0 record, i tested with with 1000 records it was working fine,now it is not working.
My idea is, i like to do the field with "auto complete", but i don't have any idea to implement the auto suggestion in the admin custom field.
if you have any other idea means kindly let me know,thanks in advance for your answer.