Announcement

Collapse
No announcement yet.

Possibility to recalculate the formulas by formula?

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

  • #31
    telecastg , I implemented and it works as expected, very elegant. Thank you a lot.
    By the way, from the former solution I have handler-files for every entity, where I used the button before in restricted form. These handlers are obsolete now, right?
    Last edited by shalmaxb; 02-21-2021, 11:12 PM.

    Comment


    • telecastg
      telecastg commented
      Editing a comment
      You're welcome shalmaxb what do you mean by "handlers" ? could you provide an example please ?

    • shalmaxb
      shalmaxb commented
      Editing a comment
      telecastg, I had this code in client/custom/src/ before: https://forum.espocrm.com/forum/gene...4301#post64301.
      This was necessary for every entity, where I wanted the recalculate button. I think, these files are not longer necessary, because your unrestricted.... code provides the function for all entities.

    • telecastg
      telecastg commented
      Editing a comment
      No you don't need that custom handler anymore, it was substituted by client/custom/src/unrestricted-recalculate-formula-handler.js

  • #32
    Hi, telecastg is your solution still valid for current (7.0.10) version of Espo?

    I'm getting a 500 error:
    Code:
     "message": "Slim Application Error"
    And this is the Espo log:

    Code:
    [2022-04-15 10:09:36] ERROR: Slim Application Error Type: Error Code: 0 Message: Call to undefined method Espo\Custom\Controllers\RecalculateFormula::getMassActionParamsFromData() File: /var/www/html/custom/Espo/Custom/Controllers/RecalculateFormula.php Line: 12 Trace: #0 /var/www/html/application/Espo/Core/Api/ActionProcessor.php(120): Espo\Custom\Controllers\RecalculateFormula->postActionUnrestrictedRecalculateFormula(Array, Object(stdClass), Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper)) #1 /var/www/html/application/Espo/Core/Api/RequestProcessor.php(136): Espo\Core\Api\ActionProcessor->process('RecalculateForm...', 'unrestrictedRec...', Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper)) #2 /var/www/html/application/Espo/Core/Api/RequestProcessor.php(111): Espo\Core\Api\RequestProcessor->proceed(Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper)) #3 /var/www/html/application/Espo/Core/Api/RequestProcessor.php(82): Espo\Core\Api\RequestProcessor->processInternal(Object(Espo\Core\Api\Route), Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper)) #4 /var/www/html/application/Espo/Core/Api/Starter.php(103): Espo\Core\Api\RequestProcessor->process(Object(Espo\Core\Api\Route), Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper)) #5 /var/www/html/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(43): Espo\Core\Api\Starter->Espo\Core\Api\{closure}(Object(Slim\Psr7\Request), Object(Slim\Psr7\Response), Array) #6 /var/www/html/vendor/slim/slim/Slim/Routing/Route.php(384): Slim\Handlers\Strategies\RequestResponse->__invoke(Object(Closure), Object(Slim\Psr7\Request), Object(Slim\Psr7\Response), Array) #7 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Slim\Routing\Route->handle(Object(Slim\Psr7\Request)) #8 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) #9 /var/www/html/vendor/slim/slim/Slim/Routing/Route.php(341): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) #10 /var/www/html/vendor/slim/slim/Slim/Routing/RouteRunner.php(84): Slim\Routing\Route->run(Object(Slim\Psr7\Request)) #11 /var/www/html/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(59): Slim\Routing\RouteRunner->handle(Object(Slim\Psr7\Request)) #12 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\Middleware\RoutingMiddleware->process(Object(Slim\Psr7\Request), Object(Slim\Routing\RouteRunner)) #13 /var/www/html/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(107): class@anonymous->handle(Object(Slim\Psr7\Request)) #14 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\Middleware\ErrorMiddleware->process(Object(Slim\Psr7\Request), Object(class@anonymous)) #15 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): class@anonymous->handle(Object(Slim\Psr7\Request)) #16 /var/www/html/vendor/slim/slim/Slim/App.php(215): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) #17 /var/www/html/vendor/slim/slim/Slim/App.php(199): Slim\App->handle(Object(Slim\Psr7\Request)) #18 /var/www/html/application/Espo/Core/Api/Starter.php(79): Slim\App->run() #19 /var/www/html/application/Espo/Core/ApplicationRunners/Api.php(49): Espo\Core\Api\Starter->start() #20 /var/www/html/application/Espo/Core/Application/RunnerRunner.php(85): Espo\Core\ApplicationRunners\Api->run() #21 /var/www/html/application/Espo/Core/Application.php(78): Espo\Core\Application\RunnerRunner->run('Espo\\Core\\Appli...', NULL) #22 /var/www/html/public/api/v1/index.php(37): Espo\Core\Application->run('Espo\\Core\\Appli...') #23 {main} Tips: To display error details in HTTP response set "displayErrorDetails" to true in the ErrorHandler constructor. [] []
    Last edited by DashingUno; 04-15-2022, 10:10 AM.

    Comment


    • #33
      Hi, meanwhile this became an extension, which the member telecastg developed. You may find it here: https://payhip.com/b/28Dhw
      It had been adapted to work with 7.x and is easy to install and to configure. It is really worth its money.
      Last edited by shalmaxb; 04-15-2022, 11:32 AM.

      Comment

      Working...
      X