SalesforceWay
25. Does Invocable Method Come to Replace Trigger?
Amnon Kruvi joins to talk about the invocable method.
Amnon is an entrepreneur, Salesforce architect and developer, Salesforce MVP, and 14 x Certified.
Main Points
We start our conversation with what is invocable method in Apex, and how to define itThen we chat about what is the benefit of using it and in what circumstances it fit better the business needs comparing to Apex triggerFinally, we go through what are the restrictions
Links
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
The YouTube Video Link
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?
It is my highest — yes, HIGHEST — honor if you could spend your valuable time reaching me out:
LinkedIn, Twitter, Instagram => @xixiaofinlandOr my email is xixiaofinland(at)gmail.com
Take care, until next time :)!
The post 25. Does Invocable Method Come to Replace Trigger? appeared first on SalesforceWay.