Announcement

Collapse
No announcement yet.

afterSave Hook requires page refresh to view the updated result

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

  • afterSave Hook requires page refresh to view the updated result

    Hi,
    I have afterSave logic hook running from my custom module, and the result will be saved in the amount field of the Opportunity module. The calculation is happening correctly and the field is getting updated. But, to view the updated results I have to refresh the page manually.

    Can some one please help me out as to where the js and json files needs to be put, in order to get this working(real time update of the field in opportunity module).

  • #2
    Hi

    Just tested and made sure that refresh is not needed. You can debug.

    application/Espo/Services/Record.php
    application/Espo/Core/ORM/Repositories/RDB.php

    Source is open and code is not spaghetti. Not so difficult to debug.

    Comment


    • #3
      Hi,
      I have gone through these files. To be clear, there is a one to many relation between the custom module and opportunities, and I am updating the custom module from bottom-view of Opportunity module detail view. Any other references I can go through to get this running?

      Comment


      • #4
        Relations won't be updated. You can do it in frontend js. Listen to model 'sync' and then this.collecton.fetch();

        Comment


        • #5
          Originally posted by rkaranth View Post
          Hi,
          I have afterSave logic hook running from my custom module, and the result will be saved in the amount field of the Opportunity module. The calculation is happening correctly and the field is getting updated. But, to view the updated results I have to refresh the page manually.

          Can some one please help me out as to where the js and json files needs to be put, in order to get this working(real time update of the field in opportunity module).
          Hi,

          I just read your this post and would like to bother you for help.

          Can you let me know your code of the hook mentioned in your post? I do not know how to get a field update with hook code. Thank you!

          Comment

          Working...
          X