Import Jobs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AndiF
    Junior Member
    • Jun 2014
    • 2

    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
  • yuri
    Member
    • Mar 2014
    • 8455

    #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.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • AndiF
      Junior Member
      • Jun 2014
      • 2

      #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

      • yuri
        Member
        • Mar 2014
        • 8455

        #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); 
        
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment

        • yuri
          Member
          • Mar 2014
          • 8455

          #5
          correct path to existing job: application/Espo/Modules/Crm/Jobs/
          If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

          Comment

          Working...