Valid PDI Dumps shared by ExamDiscuss.com for Helping Passing PDI Exam! ExamDiscuss.com now offer the newest PDI exam dumps, the ExamDiscuss.com PDI exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com PDI dumps with Test Engine here:
What are three considerations when using the @InvocableMethod annotation in Apex? Choose 3 answers
Correct Answer: A,D,E
When using the @InvocableMethod annotation in Apex, there are specific considerations to keep in mind: Option A: Only one method using the @InvocableMethod annotation can be defined per Apex class. True. An Apex class can contain only one method annotated with @InvocableMethod. This ensures that when the class is invoked from a flow or process, there is no ambiguity about which method to execute. The method must be static because it is called without instantiating the class. Static methods belong to the class rather than an instance of the class. The method must be declared as public or global so that it is accessible outside the class, especially when invoked from flows or processes. The method can define a return value, but it is not mandatory. If a return value is provided, it must be a list of a supported data type. The method can have only one parameter. This parameter must be of a supported data type or a list of supported data types. Reference: InvocableMethod Annotation Option D: A method using the @InvocableMethod annotation must be declared as static. True. InvocableMethod Annotation Requirements Option E: A method using the @InvocableMethod annotation can be declared as public or global. True. Access Modifiers for Invocable Methods Incorrect Options: Option B: A method using the @InvocableMethod annotation must define a return value. False. Invocable Method Return Types Option C: A method using the @InvocableMethod annotation can have multiple input parameters. False. Invocable Method Parameters