Invocable methods in Apex are called as invocable actions by the REST API and require the InvocableMethod annotation as an identifier. This can only be applied to one method in class and takes a maximum of 1 input parameter of a list of either a primitive data type, an sObject type or a user defined type.
Invocable methods in Apex are called as invocable actions by the REST API and require the InvocableMethod annotation as an identifier. This can only be applied to one method in class and takes a maximum of 1 input parameter of a list of either a primitive data type, an sObject type or a user defined type.
- Triggers cannot use invocable methods.
- the invocable method must be static and public or global and in an outer class
- other annotations cannot be used with the InvocableMethod annotation
- Invocable methods can be used in packages but once added cannot be removed from later versions of the package