Announcement

Collapse
No announcement yet.

How fetch entity inside custom service action for workflow

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How fetch entity inside custom service action for workflow

    Hi,
    im trying to fetch record inside custom service action for workflow. I follow this example https://www.espocrm.com/features/add...-for-workflow/
    but now i cant fetch data inside this class.

    PHP Code:

    $app 
    = new \Espo\Core\Application();

    $entityManager $app->getContainer()->get('entityManager');  

    $accountList $entityManager->getRepository('Account')->limit(02)->find();  

    // $accountList is empty and i have a lot of account created 
    Thanks

  • #2
    why did you create an object $app?
    entity manager is available from service with calling $this->getEntityManager()

    Describe all files, you created, and content of files

    Comment

    Working...
    X