Logic Hooks Not Working

Logic Hooks are not working. I followed the documents provided by Sugar. Even logs are not generated. 

Please provide code and specify location where files should be added.

Used below location:

custom/Extension/modules/Ext/LogicHooks/logic_hooks.php

custom/modules/Order/logic.php

Version : 10.3 (Enterprise Edition)

Parents
  • it looks like you have an error in the directory path:

    custom/Extension/modules/Ext/Order/LogicHooks/logic_hooks.php

    The rule is as follows:

    Application Logic hooks go in:

    ./custom/Extension/application/Ext/LogicHooks/

    Module  specific logic hooks go in the Extension directory of the specific module:

    ./custom/Extension/modules/<module>/Ext/LogicHooks/

    Francesca

  • Followed below approach : 

    1.We need  to add the definition file in .custom/Extension/modules/<modulename>/Ext/LogicHooks/logic_hooks.php where you will define the hook actions that will trigger the logic.

    2.In .custom/modules/<modulename>/<yourfilename.php> you have to add your logic file

    Able to implement logic Hooks.

    #How we can apply Logic Hooks on custom button ?

    #How we can call Sugar APIs and external APIs  on click of custom button ? 

    It will be great help if you can suggest something here.

Reply
  • Followed below approach : 

    1.We need  to add the definition file in .custom/Extension/modules/<modulename>/Ext/LogicHooks/logic_hooks.php where you will define the hook actions that will trigger the logic.

    2.In .custom/modules/<modulename>/<yourfilename.php> you have to add your logic file

    Able to implement logic Hooks.

    #How we can apply Logic Hooks on custom button ?

    #How we can call Sugar APIs and external APIs  on click of custom button ? 

    It will be great help if you can suggest something here.

Children
  • Logic hooks are not for custom buttons, they are action driven not user-driven.

    From your many questions, it looks like you are in need of some help familiarizing with the fundamentals of Sugar's architecture.

    I was where you are today and it all felt so muddled...
    The Community is a great place to get help, but it helps a lot if you have the basics.

    Getting to know the concepts and terminology will greatly help with asking the right questions and searching for the right things in the Sugar documentation.

    May I suggest you spend a little time getting more familiar with these courses?

    So many of them are free and I assure you it will help you! Slight smile

    https://sugarclub.sugarcrm.com/learn/

    Welcome to the sweet side of Sugar! 

    FrancescaS