update field in meeting module when contact in contact module has been updated

Hi,

I am planning to add a custom query update in the contact but I am not sure which file should I add the code.

$query = "UPDATE meetings SET phone_home_c=’{$this->phone_home}’ WHERE parent_id = ‘{$this->id}’ ";

I definitely need to be able to update the custom field in the meeting module once the contact in contact module has been updated.

Any idea please?

Have you considered doing it either with a Workflow (no coding required, but I am not sure if it is achievable) or an after_save (or before_save if you prefer) Logic Hook (a relatively standard custom code required)?

Hi,

Can you please give me an idea how to achieve it using logic hook?

Have a look here: https://github.com/audoxcl/SugarCRMLogicHooks
You should be able understand how to do it.

Then you can customise your code and update the fields you are looking to update.

If you implement it as a module it will also be easier to remove or to implement in a different instance of the crm.

Feel free to bump in case you need help.