“Hooking Up” Custom Business Logic
This article is the second in a series of posts about using a SugarCRM business logic hook to protect customized code against possibly being corrupted by future system updates.
In this example, an UpCurve Cloud client wanted to be able to know when and if a sales rep actually opened a sales lead after it was assigned to him or her by a manager. The client wanted to be able to report on how many assigned leads each rep opened, compared to assigned leads not opened.
Once again, we used a business logic hook to incorporate the customized business logic into the client’s SugarCRM system. In this case, the required business logic was quite simple. We used an event called after_retrieve. Now, when a manager assigns a sales lead to a rep, the status of the lead record is set to New. When the rep loads the new record in either detail view or edit view, the business logic hook automatically changes the status from New to Assigned, enabling the client to obtain a report showing for each sales rep the number of assigned leads opened and the number not opened.
See why we’re ‘hooked” on the SugarCRM business logic hooks? How do you use logic hooks in your Sugar instance? Let us know here.