Subpanel create dosent trigger hook

I am working in hook. When I create a record from subpanel it dosent trigger the hook. But when I use `link existing record` the hook is executing. Which hook should we use when `create` from subpanel.

$hook_array['after_relationship_add'][] = array(
    1,
    'after relationship hook',
    'custom/modules/Records/Hooks/LinkedRecord.php',
    'Records_Hooks_LinkedRecord',
    'linkedRecords',
);
Parents
  • Yes, as Kenneth Brill said, you can use before_save or after_save logic hook to make sure whenever you perform any changes in your record (be it from record view or subpanel view or list view), it should trigger the logic hook.

    Relationship add/delete logic hooks are executed when you add or remove child module from the parent module.

    Regards.

    Hats

Reply
  • Yes, as Kenneth Brill said, you can use before_save or after_save logic hook to make sure whenever you perform any changes in your record (be it from record view or subpanel view or list view), it should trigger the logic hook.

    Relationship add/delete logic hooks are executed when you add or remove child module from the parent module.

    Regards.

    Hats

Children
No Data