+ Start a Discussion
sangam vvsangam vv 

Process Builder ?

how to call apex class from process builder?
Vasani ParthVasani Parth
Sangan - When no other process action can get the job done, add customized functionality to your Salesforce processes by calling an Apexmethod.To call an Apex method, add the Call Apex action to your process and select an Apex class with an invocable method. It’s that easy.If the class contains one or more invocable variables, manually enter values or reference field values from a related record. Each value must match the variable’s data type.

Here's an example to get you started , call apex class from process builder (http://salesforceworld4u.blogspot.in/2015/05/how-to-call-apex-class-from-process.html)

Please mark this as the best answer if this helps
AnuragGautamAnuragGautam
Hi Sangam,

You have to use "Apex Code " action from process builder. As mentioned in below screen shot.

User-added image
Thanks,
Anurag
apex sfdevapex sfdev
 use @InvocableMethod Annotation. This annotation lets us mark an Apex method as being something that can be call from somewhere other than Apex

Just follow the steps given in https://automationchampion.com/2015/07/09/getting-started-with-process-builder-part-33-call-an-apex-method-from-a-process/
 
Chidanand MChidanand M
use @InvocableMethod in your apex Method