Platform Developer 2 Exam Flashcards
What annotation is needed on an Apex class to make it available to be called from a flow/process builder?
@InvocableMethod
What element do you use in Flow Builder to invoke Apex code?
Apex Action
What tag is used to embed a flow in a Visualforce page?
<flow:interview> component
</flow:interview>
How can you call a flow from Apex?
By using the Start method of the Interview class
What are the Invocable Method requirements?
Method requirements:
- must be static
- public or global
- annotated with @InvocableMethod
How many method parameters can an Invocable Method have?
<= 1
How many methods can be annotated with the @InvocableMethod annotation in an Apex class?
Only one
Can you use multiple annotations on an @InvocableMethod method?
Nope
What data structure & type must the parameter be for an Invocable Method?
List (List of List works as well). Can be a specific or generic sObject type
What data structure & type must the return type be for an Invocable Method?
List (List of List works as well). Can be a specific or generic sObject type
Where can you call an @InvocableMethod from?
Process builder, Flow, REST API
What is an @InvocableVariable?
Annotation in a class with an @InvocableMethod that allows the variables to be accessible in the @InvocableMethod
Who is the running user for the @InvocableMethod?
The running user that triggered the process
What are the 3 advanced options in Apex action flow elements?
- (recommended) Flow decides at run time
- Apex action always runs in a different transaction
- Apex action always runs in the same transaction
Where can you embed a flow?
LWC, Aura, VF page
Can you embed a LWC in a flow?
Yes