True or False: Only one method in a class can have the InvocableMethod annotation.

Prepare for the Salesforce Process Automation test. Use flashcards and multiple choice questions, each with hints and explanations. Get ready for success!

The statement is true because in Apex, which is Salesforce's programming language, the InvocableMethod annotation is designed to allow a method to be called from other processes, such as Flow and Process Builder. To ensure clarity and avoid any confusion in the intended use of these methods, Salesforce restricts the usage of the InvocableMethod annotation to one method per class. This means that if you annotate more than one method in a single class with InvocableMethod, the system will throw an error, as it expects only one method to take on that role. This design decision helps maintain the integrity and simplicity of process automation within Salesforce, ensuring that each class has a single point of invocation in the context of automated processes.

Thus, the answer accurately reflects the restrictions placed on the InvocableMethod annotation.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy