New case note logic hook

I want to fire an after save logic hook when a new case note is created and saved. As notes are used by multiple modules, I wandered the best place for the login hook

1. On the case module and run on new note

2 On the notes module when parent module is Cases

was thinking to check against the parent with an on save hook against parent->type == Case

just wandered the best place to run the hook from

Parents Reply
  • Hey  ,

    To clarify:

    • Logic hooks are a backend technology (they run on the server)
    • App.* is a frontend technology (runs on your browser)

    The frontend "talks" to the backend via APIs.

    If you need some visual alert you would need to implement that on the frontend, either by validating just on the frontend the user input/actions, or after confirming the actions (or no actions) of the backend

    Hope it helps

    --

    Enrico Simonetti

    Sugar veteran (from 2007)

    www.naonis.tech


    Feel free to reach out for consulting regarding:

    • API Integration and Automation Services
    • Sugar Architecture
    • Sugar Performance Optimisation
    • Sugar Consulting, Best Practices and Technical Training
    • AWS and Sugar Technical Help
    • CTO-as-a-service
    • Solutions-as-a-service
    • and more!

    All active SugarCRM certifications

    Actively working remotely with customers based in APAC and in the United States

Children
  • Hi   thank you for clarifying and that was my thought. the reason for double checking is that my logic hook sends out an update to our website usingExternalResourceClient. I wanted to just let the sugar user know that this was successful  hence asking if it can be done from the logic hook as there isn't any frontend change to check against

  • Hi  ,

    Not a problem!

    If that's the case, I would then attempt to extend/customise an API that completes your website's call (given that it sounds like it might be a synchronous call either way), so that you have immediate feedback from the back-end to the front-end, and then you can display the correct message to the user based on what the API returns.

    This approach should give you what you are after.

    Cheers

    --

    Enrico Simonetti

    Sugar veteran (from 2007)

    www.naonis.tech


    Feel free to reach out for consulting regarding:

    • API Integration and Automation Services
    • Sugar Architecture
    • Sugar Performance Optimisation
    • Sugar Consulting, Best Practices and Technical Training
    • AWS and Sugar Technical Help
    • CTO-as-a-service
    • Solutions-as-a-service
    • and more!

    All active SugarCRM certifications

    Actively working remotely with customers based in APAC and in the United States