Amnon Kruvi joins to talk about the invocable method.
Amnon is an entrepreneur, Salesforce architect and developer, Salesforce MVP, and 14 x Certified.
- We start our conversation with what is invocable method in Apex, and how to define it
- Then we chat about what is the benefit of using it and in what circumstances it fit better the business needs comparing to Apex trigger
- Finally, we go through what are the restrictions
- Amnon’s twitter handle
- Article – Why Invocable Methods Could Spell the End for Apex Triggers
- Video – Invocable Methods: The Musical
Video Teaser – Musical Invocable Method
My Hands-on Video on Invocable Method
My Thoughts on This Topic
I have heard about the invocable method is before and vaguely known how it works. But I have never put in-depth thought on it. What is it really for? In what situation can it replace the trigger? Why can it bring the solution flexibility to the next level?
As a Salesforce developer, one of the essential skills is to know when to code and when not. This comes from years of hands-on experience and knowing what point-and-click can do.
In the previous episode, Andy Fawcett introduced the concept of Separation of Concerns. From that, I can draw a close analogy by using the invocable to fulfill the business requirements.
To summarize, the admins’ task is to define the condition and context to execute a process. The developer’s task is to put the complex data calculation action into an invocable.
Btw, I also recommend you to check the remarkable musical video Amnon did on the very same topic. It demonstrates the engaging power of the combination of knowledge and entertainment!
Question of Today
Have you ever used the invocable method in a real project? If so, what was your experience?
If you enjoy this podcast, please reach me out to let me know your thoughts or simply say Hello. My (Xi’s) contact info:
Take care, until next time :)!