AnsweredAssumed Answered

before save logic hook gets executed multiple times

Question asked by sidhu sidhu on Apr 14, 2016
Latest reply on Apr 14, 2016 by Bhavesh Patel

Hi All


    I have a custom module and i have created an before save logic hook.

But it gets executed multiple times.






$hook_version = 1;

$hook_array = array();

$hook_array['before_save'] = array();

$hook_array['before_save'][] = Array(


        //Processing index. For sorting the array.




























  if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');




class update_user{

     function update_user($bean, $event, $arguments){


               global $current_user;


                    if($bean->fetched_row['name'] != $bean->name)//when name changed











After i changed the name and save the record the users_following_c returns values as ,1,,1,,1,,1,,1,,1,,1,,1,,1,,1,,1, in record view-gets executed multiple times.