You need to sign in to do that
Don't have an account?
Andrey Bolkonsky
How to call my Apex Method from a Flow
Hello,
I just finished my first ever Apex class (I am very new to this stuff). The main method I want to call has the return type of string.
I want to write a trigger and also a flow to call it just so I know how to use both to trigger Apex. But When I try to use the @InvocableMethod anotation so I can launch it from a flow, I get the error
InvocableMethod methods do not support return type of String
Below is the firtst part of the method I want to call.
I just finished my first ever Apex class (I am very new to this stuff). The main method I want to call has the return type of string.
I want to write a trigger and also a flow to call it just so I know how to use both to trigger Apex. But When I try to use the @InvocableMethod anotation so I can launch it from a flow, I get the error
InvocableMethod methods do not support return type of String
Below is the firtst part of the method I want to call.
@InvocableMethod(label='Write Number' description='Writes the Number' category='Opportunity') public static String writeNumber()
>> https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_InvocableMethod.htm
As mentioned in the above documentation can you check if you are able to return list<string>.
Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks.
Unsupported parameter type Integer. Valid invocable parameters must be List types like List<T> where T is a supported type