Salesforce 管理者が、レコードによってトリガーされるフローを作成しています。特定の条件が満たされた場合、フローは Apex メソッドを呼び出して、複数のタイプのオブジェクトを含む複雑な検証を実行する必要があります。
Apex メソッドを作成するとき、メソッドがフロー内で使用できることを確認するために、開発者はどのアノテーションを使用する必要がありますか?
正解:C
The @InvocableMethod annotation is used to identify a method in an Apex class that can be called from a flow, a bot, or an NBA strategy. It is a helpful annotation to provide a seamless admin-friendly way to call the Apex code using simple flows. Invoking Apex from flow is a significant option for providing design patterns that can solve many business problems while also providing great user experience. The other annotations are not suitable for this scenario, as they have different purposes and limitations. For example, the @future annotation is used to execute a method asynchronously, the @RemoteAction annotation is used to expose a method to a Visualforce page, and the @AuraEnabled annotation is used to enable a method to be called from a Lightning web component or an Aura component. References: Annotations, How to Invoke Apex from Flows Using InvocableMethod Annotation, Salesforce Flow