Friday, July 15, 2016

Limitations of @InvocableMethod annotation in Salesforce


This Annotation will be used whenever you want to invoke an apex method from the Process Builder then that method must be declared as @InvocableMethod ,otherwise it can't be accessed in Process Builder .@InvocableMethod annotation have some limitations when your using it.

Limitations of @InvocableMethod Annotation:

  • Invocable method will not accept more than one argument as a method parameter
  • Only static methods can be invocable methods
  • More than one invocable method is not allowed per class

Method with Invocable Annotation Example:

public class UserHistoryProcessor
  public static void updateUserHistory(List<Id> userIds)
    //related code here

Thanks for visiting...Enjoy!

No comments:

Post a Comment