Activity › Forums › Salesforce® Discussions › What is the use of @InvocableMethod in Salesforce?
Tagged: Apex Methods, InvocableMethod, InvocableMethod Annotation, Lightning Process Builder, Outbound Message, Salesforce Apex Class, Salesforce Process Builder, Salesforce Records
-
What is the use of @InvocableMethod in Salesforce?
Posted by Saddam on August 9, 2019 at 11:33 AMwhat is the use of @InvocableMethod in Salesforce?
Laveena replied 6 years, 9 months ago 2 Members · 1 Reply -
1 Reply
-
Hi Saddam,
While the Process builder is very flexible out of the box, there are a few business use cases those are not achievable using it. For example
1. It doesn’t support outbound messages
2. It doesn’t support creation of multiple records
3. It doesn’t allow us to delete a recordWhen no other process action can get the job done, add customized functionality to your Salesforce processes by calling an Apex method. To call an Apex method, add the Call Apex action to your process and select an Apex class with an @invocable method Annotation. It means they allow us to extend the Process Builder by writing Apex code that meets certain criteria, and then invoking the Apex from our Processes. If the class contains one or more invocable variables, manually enter values or reference field values from a related record. @InvocableMethod Annotation support bulk operations.
Thanks
Log In to reply.