Hi!
When using the Run Service Action, I change only the "Stage" field, but for some reason such records appear in Stream
Service Action:
When using the Run Service Action, I change only the "Stage" field, but for some reason such records appear in Stream
Service Action:
PHP Code:
<?php
namespace Espo\Custom\Services;
use \Espo\ORM\Entity;
class SetStageRelationCallandOpportunity extends \Espo\Core\Services\Base
{
public function setStageRelationCallandOpportunityAction($workflowId, Entity $entity, array $additionalParameters = null)
{
$opportunity = $entity->get('parent');
$stage = "SettingDetails";
if ($opportunity) {
$entityManager = $this->getEntityManager();
$opportunity->set(array(
'stage'=> $stage));
$entityManager->saveEntity($opportunity, array('skipWorkflow' => true));
}
}//$entityManager->saveEntity($entity, array('skipWorkflow' => true));
}
?>
Comment