Add hook to contact module

Hello everybody,

I tried to make a logic_hook after save for the module contact, so i followed this instructions: http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_7.6/Logic_Hooks/Module_Hooks/after_save/

But that’s not working and i don’t understand why. Here’s my /custom/Extension/Contacts/Ext/LogicHooks/ViewOnCal.php

And my /custom/modules/Contacts/contactbirth.php

And my /custom/modules/Contacts/LogicHooks/logichooks.ext.php which is auto generated

That seems to be fine but the hook is never activated so the content of my contatctbirth is never call.

Can someone help me ?

Thank’s.

Hi,

I can’t see any major issues with what you’ve posted.

However, you mention that your logic hook file is in the location:
/custom/Extension/Contacts/Ext/LogicHooks/

I believe that, normally, they’d be in the location:
/custom/Extension/ modules /Contacts/Ext/LogicHooks/

If the Logic hook files aren’t in the:
/custom/Extension/ modules /Contacts/Ext/LogicHooks/
location, then im unsure as to whether they will work are not.

Also, Might I ask what it is you are trying to achieve using this Logic Hook? From what I can see you’re trying to add a “View on Calender” button, but where are you trying to add this? (i.e, List view, Detail view, etc…?)

It seems like it might be similar to what Jim has written here: http://www.jsmackin.co.uk/suitecrm/add-row-buttons-to-the-list-view-in-suitecrm/
Does the guide written by Jim assist at all?

Hi John,

Thank’s for your reply.

Yes sorry my file is in the location :
/custom/Extension/ modules /Contacts/Ext/LogicHooks/

In fact, i have many hooks which works that’s the only one which is not working and i build this hook exactly as the same way as the others.

With this hook I’m trying to make a reminder for bithday date if the field is fill. I created my own reminder module.
The problem is, i can’t make this from a view I need to make this after saving.

And yes it seems similar to the guide written by Jim, because I have followed his guide to create my hooks.

Best regards.