You need to sign in to do that
Don't have an account?
Coolday
Can we use @auraenabled and @invokable at the same time in Apex Class?
We have a requirement for which I created a LWC component and Flow for the same Apex class. Can we use @Auraenabled and @Invokable at the same time for the method in Apex class.
Thanks
Thanks
Yes, you can use multiple annotations on a method or class; they are written separated by any whitepsace. But there are some exceptions for it like
You can not add both @future and @InvocableMethod to a single method.
Coming to your question as per the documentation
Let me know if you face any issues.
If this solution helps, Please mark it as best answer.
Thanks,
All Answers
Yes, you can use multiple annotations on a method or class; they are written separated by any whitepsace. But there are some exceptions for it like
You can not add both @future and @InvocableMethod to a single method.
Coming to your question as per the documentation
Let me know if you face any issues.
If this solution helps, Please mark it as best answer.
Thanks,
Yes as I highlited above it may not be possible to add another annotation with InvocableMethod.
Thanks,