AnsweredAssumed Answered

Using bean how can i fetch single records from any module?

Question asked by Ajit Agarw on Feb 3, 2017
Latest reply on Feb 3, 2017 by Jeff Bickart

$account = new Account();
$contacts = $account->get_linked_beans('contacts','Contact');
foreach ( $contacts as $contact ) {
echo "{$contact->name}\n"


Using this type of code we can easily get the records from Related module. But my Query is using this code in $contacts variable store all the records of related module and using foreach() we take out the values. But i wants only some selected values to be fetched.

for example i only need id, name and phone.

So how  can i do it possible or  there is any way to pass some parameters.

If u know please suggest me.


Thank You