diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index bd96128a3d7..43c3f7a15e4 100644 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -799,7 +799,8 @@ class InterfaceActionsAuto extends DolibarrTriggers if ($object->sendtoid > 0) $contactforaction->fetch($object->sendtoid); } // Set societeforaction. - if ($object->socid > 0) $societeforaction->fetch($object->socid); + if ($object->socid > 0) $societeforaction->fetch($object->socid); + elseif ($object->fk_soc > 0) $societeforaction->fetch($object->fk_soc); $projectid = isset($object->fk_project)?$object->fk_project:0; if ($object->element == 'project') $projectid = $object->id;