Hi,
How to set Teams in Email using Hook?
I have tried something like this in afterSave
$entityManager = $this->getEntityManager();
$allTeams = $entityManager->getRepository('Team')->getAll();
$entity->set('teams', $allTeams->current()->get('id'));
$entityManager->saveEntity($entity, array('SkipAll' => true));
It doesn't set new team.
It should work in beforeSave also by just avoiding saveEntity, just calling set?
How to set Teams in Email using Hook?
I have tried something like this in afterSave
$entityManager = $this->getEntityManager();
$allTeams = $entityManager->getRepository('Team')->getAll();
$entity->set('teams', $allTeams->current()->get('id'));
$entityManager->saveEntity($entity, array('SkipAll' => true));
It doesn't set new team.
It should work in beforeSave also by just avoiding saveEntity, just calling set?
Comment