Hi I found this in document
I put in to logic hook its work but it return huge result.
How can I get all status from this ? any suggestion ?
I tried to using array_filter but it return wrong result.
I need to filter status to make a decision in my logic.
if ($bean->load_relationship('cases')){
$relatedBeans = $bean->cases->getBeans();
$checkCase = array_filter($bean->cases->getBeans(), function($case){
return $case->test_c == 'x1' && $case->test2_c == 'x2' && date("Y-m-d",strtotime($case->date_entered)) == date("Y-m-d") ;
});
$GLOBALS['log']->fatal($relatedBeans);
}
Sugar 7.7
Thanks,
May