Activity › Forums › Salesforce® Discussions › What is the use of AuraEnabled Annotation in Salesforce?
Tagged: Annotation, AuraEnabled, Javascript Code, Salesforce Apex Class, Salesforce Lightning Components
-
What is the use of AuraEnabled Annotation in Salesforce?
Posted by Sanjana on July 6, 2018 at 5:34 AMWhat is the use of AuraEnabled Annotation in Salesforce?
Avnish Yadav replied 7 years, 8 months ago 5 Members · 4 Replies -
4 Replies
-
Hello Sanjana,
Writing this annotation makes the method availaible in Lightning component. It simply enables the access to that particular Apex class through the java script code that we have written
- [adinserter block='9']
-
Hi
Use @AuraEnabled on Apex class static methods to make them accessible as remote controller actions in your Lightning components.
Use @AuraEnabled on Apex instance methods and properties to make them serializable when an instance of the class is returned as data from a server-side action.Thanks.
-
Hi,
The AuraEnabled annotation provides support for Apex methods and properties to be used with the Lightning Component framework.
The AuraEnabled annotation is overloaded, and is used for two separate and distinct purposes.Use @AuraEnabled on Apex class static methods to make them accessible as remote controller actions in your Lightning components.
Use @AuraEnabled on Apex instance methods and properties to make them serializable when an instance of the class is returned as data from a server-side action.Hope this helps!
-
Hello,
We use AuraEnabled Annotation in Salesforce so that particular method is available for the Lightning component in Salesforce.
Thanks.
Log In to reply.