Salesforce Certified Platform Developer II — Question 97
Which of the following annotations is the right way to invoke a single apex method?
Answer options
- A. @InvokableMethod()
- B. @InvokableAction()
- C. @InvokableApex()
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.