Updatesave Customization

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Maho
    Junior Member
    • Mar 2016
    • 29

    Updatesave Customization

    Hi,

    I was doing some code additions in the EspoCRM\application\Espo\Modules\Crm\Services\Acco unt.php.
    From all I see I am pretty sure that if there is an Update on this file my coding will be gone.
    In several other places there is a custom folder that extents the "standard"-class.

    I was wondering where I need to put my additional code to make it updatesave either.

    Thank you
  • yuri
    Member
    • Mar 2014
    • 8485

    #2
    Hi

    custom/Espo/Custom/Services/Account.php


    <?php
    namespace Espo\Custom\Services;

    class Account extends \Espo\Modules\Crm\Services\Account
    {
    ...
    }
    Last edited by yuri; 08-30-2016, 01:46 PM.
    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

    • Maho
      Junior Member
      • Mar 2016
      • 29

      #3
      Thank you

      had to extend the url like this but works perfect.
      \Espo\Modules\Crm\Services\Account

      Comment

      • Maho
        Junior Member
        • Mar 2016
        • 29

        #4
        Hi sorry for the return on this but I just realized that Espo brings up an error.
        When I get it right it guesses the correct path.
        could you help`?

        PHP Code:
        [2016-09-01 14:36:37] Espo.ERROR: E_RECOVERABLE_ERROR: Argument 1 passed to Espo\Custom\Services\Account::loadAdditionalFieldsForList() must be an instance of Espo\Custom\Services\Entity, instance of Espo\Modules\Crm\Entities\Account given, called in C:\xampp\htdocs\EspoCRM\application\Espo\Services\Record.php on line 689 and defined {"code":4096,"message":"Argument 1 passed to Espo\\Custom\\Services\\Account::loadAdditionalFieldsForList() must be an instance of Espo\\Custom\\Services\\Entity, instance of Espo\\Modules\\Crm\\Entities\\Account given, called in C:\\xampp\\htdocs\\EspoCRM\\application\\Espo\\Services\\Record.php on line 689 and defined","file":"C:\\xampp\\htdocs\\EspoCRM\\custom\\Espo\\Custom\\Services\\Account.php","line":41,"context":[]} [] 
        
        Thank you

        Comment

        • yuri
          Member
          • Mar 2014
          • 8485

          #5
          It's php related question. You'd better google such errors. Seems it's missing 'use' in php file.
          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

          • Maho
            Junior Member
            • Mar 2016
            • 29

            #6
            you are right thank you

            Comment

            Working...