Workflow - Run service action problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • theBuzzyCoder
    Senior Member
    • Feb 2018
    • 102

    Workflow - Run service action problem

    When i save an entity in workflow with run service action and that service saves the same entity again, the stream reports a update post twice for the same update. Is there anyway to fix it.

    My Service action:

    PHP Code:
    class CustomServiceActions extends \Espo\Core\Services\Base {
          public function action($workflowId, Entity $contactEntity, $additionalParameters = null) {
                // do something
                $this->getEntityManager()->saveEntity($contactEntity);
          }
    } 
    
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    $this->getEntityManager()->saveEntity($contactEntity, ['skipWorkflow' => true, 'skipModifiedBy' => true]);

    Comment

    • theBuzzyCoder
      Senior Member
      • Feb 2018
      • 102

      #3
      Thanks. skipAll worked for me!

      Comment

      Working...