Announcement

Collapse
No announcement yet.

Import Jobs

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

  • Import Jobs

    Hi there,

    is it possible to get a quick introduction to generate a Import Job Class (File).

    The idea behind is, to get the accounts and/or contacts from a other system (like a erp-system) and import or update that data as a job to espocrm.

    Thank you in advance.

    Best Regards,

    Andreas

  • #2
    Hi

    You need to create your job class in custom/Espo/Custom/Jobs dir. Take existing job as an example from application/Espo/Jobs. After Clear Cache your job should appear in Scheduled Job lists. Not 100% sure because I'm not able to check now.

    Comment


    • #3
      Hi Yurikuzn,

      thanks for your fast answer.

      The Job are aktiv in the in the path application/espo/... but not in the custom-path.

      Can you maybe give me an example to include a new row (and maybe an idea to update a existing row) in the table account with the relevant php-object.

      Thanks again...
      Last edited by AndiF; 06-27-2014, 08:53 PM.

      Comment


      • #4
        I'm not sure whether I understood you right.

        This is the example how to create and store account entity;
        PHP Code:

        $account 
        $this->getEntityManager()->getEntity('Account');
        $account->set(array(
          
        'name' => $name,
          
        'industry' => $industry,
          
        'assignedUserId' => $this->getUser()->id,
        ));
        $this->getEntityManager()->saveEntity($account); 

        Comment


        • #5
          correct path to existing job: application/Espo/Modules/Crm/Jobs/

          Comment

          Working...
          X