Yes, a method annotated with the @InvocableMethod annotation must have a return value. The @InvocableMethod annotation defines a method that a Flow or Process Builder can invoke, and the method's return value is used to pass data back to the Flow or Process Builder.
According to the Salesforce documentation, the return type of a @InvocableMethod must be a class or collection of classes, and the class must be annotated with the @InvocableVariable annotation. The class must have one or more fields that represent the information returned to the Flow or Process Builder.
If you find this answer helpful, please mark it as the best. Thank you.
Yes, a method annotated with the @InvocableMethod annotation must have a return value. The @InvocableMethod annotation defines a method that a Flow or Process Builder can invoke, and the method's return value is used to pass data back to the Flow or Process Builder.
According to the Salesforce documentation, the return type of a @InvocableMethod must be a class or collection of classes, and the class must be annotated with the @InvocableVariable annotation. The class must have one or more fields that represent the information returned to the Flow or Process Builder.
If you find this answer helpful, please mark it as the best.
Thank you.