AnsweredAssumed Answered

After fetch related beans and update some fields and fetch again gives old records

Question asked by Ishan shah on Mar 27, 2018
Latest reply on Nov 6, 2019 by Selvamuthukumar Rajulu

in_customer_bean = BeanFactory::getBean("IN_Customers",$customer_id);

 

        if ($in_customer_bean->load_relationship('in_locations')) {

 

   

            $relatedBeans = $in_customer_bean->in_locations->getBeans();

              foreach(  $relatedBeans  as key => $value){

                  $value->name = abc;

                  $value->save();

               }
               $relatedBeans2 = $in_customer_bean->in_locations->getBeans();

// Now this beans get me old recoard not updated.

            return $relatedBeans;

        }

Outcomes