Hi everyone,
I want to share one example of doing a workflow through code. Many times our customers have asked us to implement some processes and this is our best practice we can done.
In this example we got some processes regarding with the “Sales Stage” field in the Opportunity record and regarding with the “Amount” field of the Opportunity. You can extend this code to any core module or custom module.
In our example the process is:
When creating a new Opportunity a Task and a Call records are created.
When an Opportunity change from “Proposal/Price Quote” to “Negotiation/Review” an email is sended to all users within role “Sales Manager”.
When an Opportunity change to “Closed Won” a curl call is sended to an external app, that could be your ERP for example.
The full code is available in:
https://github.com/audoxcl/SugarCRMLogicHooks
I hope this example would be useful for you to understand the use of logichooks and using this code as a template for your own purposes.
Best Regards,
Javier Núñez
Audox IngenierĂa Ltda.
Web: www.audox.cl
Email: info@audox.cl
Phone: +56 2 2581 3799
Mobile: +56 9 9675 0572
Skype: audox.ingenieria