The logic_hooks.php file was laid down when I performed my install of SugarCRM Community Edition version 6.5.18.
And /custom/modules/Cases/logic_hooks/addUrl.php file.The /custom/modules/Cases/logic_hooks.php file.In order to create the logic hook we need to create or alter 2 files: This combined with what I wrote about last time allows us to add case notes outside of SugarCRM, which was a requirement for the job I was doing (they have other systems which need to add notes at certain stages based on the actions taken during the case).Ĭreate a Logic Hook that adds a URL before Cases are saved We are going to use a Logic Hook to add a custom-built URL to each Case that gets created in SugarCRM. You can do things like updating a record value before it is saved to the database, performing API calls to other systems in your environment, sending email messages and other things like that. Business Logic Hooks Ī Logic Hook allows you to extend CRM application logic in an 'upgrade safe' way.In order to perform custom logic each time a case is created we have to use a SugarCRM Logic Hook. The use case here is that we need to add a URL to the Case Description that the case handler needs to be able to service the customer. In this article I'll explain how you can execute custom-logic whenever a Case is created.
In a previous article I covered how to interact with the SugarCRM Community Edition REST API to add a case note.