Process Definition not Triggered from $bean->save()

Hi everyone.

I am struggling to figure out why, but a process definition that uses the "Changes" method is not firing when a logic hook is using $bean->save(). The changes is a simple "No to Yes" but when saving the record it doesn't go into the processes.

I tried doing:


$dataChanges = $bean->dataChanges;
$bean->save();
$bean->dataChanges = $dataChanges;

But seemingly had no luck. Has anyone seen this before?

Thanks

Dan

Parents Reply
  • I am however I am stopping the infinite loop using the sugar recommend approach, unless I am still not doing something right? :) 

    function contactsAfterSave($bean, $event, $arguments)
    		{		
    			$GLOBALS['log']->error('### contactsAfterSave Started');
    			if (!isset($bean->ignore_update_c) || $bean->ignore_update_c === false)
    			{
    				$GLOBALS['log']->error('### contactsAfterSave Update');
    				if ($bean->contact_type_c == 'Child')
    				{
    					$this->checkForACPFieldChanges($bean, $event, $arguments);
    				}
    				if ($bean->contact_type_c == 'Contact')
    				{
    					$this->checkForProfDetailsChanges($bean,$event,$arguments);
    				}
    				$bean->ignore_update_c = true;
    				$dataChanges = $bean->dataChanges;
    				$bean->save();
    				$bean->dataChanges = $dataChanges;
    			}
    		}

Children
No Data