AnsweredAssumed Answered

What is the right way to Fetch data from DB in Logic Hook for On Premise and OnLine).

Question asked by Parag Mittal on Jul 25, 2016
Latest reply on Aug 9, 2016 by Ramana Raju Santhana

Hi Team,

 

Following is my Use case for Both Version(On Line and On Premise).

------------------------------------------------------------------------------------------

 

I want to read All accounts(Module) from the DB When user fire an event called Before Save in logic hook, and want to do some manipulation on the data.

Once i am done with my work i want to update the same data in DB. It is kind of bulk operation to read and update the data.

 

I have tried it  with On Premise system and able to read one account from DB. How can i read all existing Accounts?

 

Following is the snippet to read one account from DB.

$AccountBean = BeanFactory::getBean('Accounts', '5213003c-3ce3-6630-46f6-5791e45f0832');

echo $AccountBean->name;

 

Regards,

Deepak

Outcomes