How to write custom function for saving a module

I have created a custom module i want to write my own function when saving the module i need some api calls to done before saving.Where can i write own function for saving a module?

Google for after_save logic hooks.

There’s a nice eBook teaching all that, “SuiteCRM for Developers” by Jim Mackin.

I have seen the hooks logic but it was’nt clear of its usage.I want to write some lines of code just before of saving record.If you can refer a link that would be very helpful.

it’s better if you explain what you tried, and what is your question, and what results you’re getting…

But here’s a link

http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_6.5/Module_Framework/Logic_Hooks/Module_Hooks/after_save/

SugarCRM 6.5 is very similar to SuiteCRM (regarding logic hooks).

Thanks for the link.I am trying to make an API call for facebook marketing api.What i have done is i have made the module which takes parameter need to send to api.Now when creating a record I need to take value of these parameter and send a call to api before saving record in suite crm database.

Ok, good luck!

If you need any actual help with the code, post the exact location of your files and their full contents here.

1 Like

It working fine Thank you.I need one more help i have post the separate question for this…It about the “Create a custom field which will select the multiple files from pc”.I just need the path of selected files in an array how can i achieve this?