Enhanced Dynamic Logic

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • telecastg
    Active Community Member
    • Jun 2018
    • 907

    #16
    tothewine
    ​​​​​​​
    Can we have a default dynamic handler that uses ajax to make calls to a controller/service we can then extend with custom class ?
    The enhanced-dynamic-handler class does that to find User roles and team membership, you can check the script client/modules/enhanced-dynamic-logic/src/enhanced-dynamic-logic.js installed as part of the plug in to see how it is done.

    Comment


    • tothewine
      tothewine commented
      Editing a comment
      Well, see this. It will be useful
      Last edited by tothewine; 06-21-2020, 11:48 AM.

    • telecastg
      telecastg commented
      Editing a comment
      Thanks !, I will post any progress here

    • telecastg
      telecastg commented
      Editing a comment
      It turned out that my problem was not really related to program flow but permissions that had to be corrected. Ajax works fine with the dynamic handler as long as you use promises to halt execution while the ajax response is received (like the documentation shows ;-) ) or by forcing the flow to continue only after the ajax response has been received, like is it done in the enhanced dynamic handler script mentioned above.

      Thanks for your help tothewine
  • telecastg
    Active Community Member
    • Jun 2018
    • 907

    #17
    New version of the enhanced-dynamic-logic free plug in released includes the ability to enable or disable inline edit for any field based on logical conditions written in the entity's dynamic-handler.

    https://github.com/telecastg/enhance...ic-for-espocrm

    https://github.com/espocrm/documenta...mic-handler.md

    Comment

    • Tommy Saucey
      Junior Member
      • Jun 2021
      • 16

      #18

      Enhanced Dynamic Logic

      Hello,

      I got enhanced-dynamic-logic:views/record/detail.js xmlhttp.status = 500
      Any got ideas ?

      Comment

      • telecastg
        Active Community Member
        • Jun 2018
        • 907

        #19
        Unfortunately the extensive code refactoring in Espo 7 has caused many customizations to become incompatible.

        I am currently very busy trying to bring our own installation up to date and do not plan to upgrade the free extensions, as they were meant to be only examples to incentivize other coders to post their work.

        Once we are done with our installation I will work on refactoring and improving our extensions and release them as commercial (paid) packages with guaranteed compatibility for 12 months.

        However, in the mean time, if you please post here the console error log and espo backend error log I will check it out and if it's something simple will try to help you.
        Last edited by telecastg; 10-22-2021, 12:48 AM.

        Comment

        • Tommy Saucey
          Junior Member
          • Jun 2021
          • 16

          #20
          Thanks you for anwser.
          Im still on 6.2 and i get the error 500.

          We are waiting few weeks before updating our espoCRM, our extensions are not longer comptabile unfotunately.
          I join screenshots about my error, the query seems to be good.

          Thank you for your help !

          Once updated to version 7, we surely will buy your extension.

          Have a good day

          Attached Files

          Comment


          • telecastg
            telecastg commented
            Editing a comment
            Thanks for the screen shots, could you also post your Espo log ? (look for the folder data/logs and get the latest log) The screen shot is saying that the Ajax call failed because of a 500 error which is a backend error, so it should show in the Espo log.
        • Tommy Saucey
          Junior Member
          • Jun 2021
          • 16

          #21
          Hey,

          Sorry for the late awnser :

          Logs below :

          [2021-10-25 07:23:04] ERROR: Uncaught Exception PDOException: "SQLSTATE[HY000] [2002] Connection refused" at /Applications/MAMP/htdocs/aerosi/application/Espo/ORM/EntityManager.php line 272 {"exception":"[object] (PDOException(code: 2002): SQLSTATE[HY000] [2002] Connection refused at /Applications/MAMP/htdocs/aerosi/application/Espo/ORM/EntityManager.php:272)"} []

          Comment


          • esforim
            esforim commented
            Editing a comment
            Not sure about the other error but this cursed PDOException error is one I remembered. Mine was not the same as your description though and it been gone for long time now. I think it got to do with your Apache PHP extensions. Have a read of my trial and error here if you want to try fix it:

            In the future this thread will be use for discussion; the Wiki hosted on Github will be used instead to post update; please see: https://github.com/o-data/EspoCRM-Learning-and-Design/wiki Part 2 of this post can be found here: https://forum.espocrm.com/forum/gene...5114#post55114 (https://forum.espocrm.com/forum/general/54706


            Be sure to click that "arrow" in the comments section as it is collapsed.

          • telecastg
            telecastg commented
            Editing a comment
            Hi, I also think that this is a server issue, not related to the extension code. I can't help with that since I have very little knowledge of server issues.
        Working...