Salesforce Certified Platform Developer II — Question 97

Which of the following annotations is the right way to invoke a single apex method?

Answer options

Correct answer: A

Explanation

The correct annotation to invoke a single Apex method is @InvokableMethod(), as it is specifically designed for this purpose. The other options, @InvokableAction() and @InvokableApex(), do not exist in Apex and therefore cannot be used to invoke methods.