Activity › Forums › Salesforce® Discussions › What is use of @AuraEnabled annotation in Salesforce?
-
What is use of @AuraEnabled annotation in Salesforce?
Posted by Pooja on July 21, 2020 at 7:28 PMWhat is use of @AuraEnabled annotation in Salesforce?
MOHIT replied 5 years, 10 months ago 3 Members · 2 Replies -
2 Replies
-
<div data-md=”61″ lang=”en-IN”><div aria-level=”3″ role=”heading” data-attrid=”wa:/description” data-hveid=”CAsQAg”>The AuraEnabled annotation enables Lightning components to access Apex methods and properties. 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.
<div><div data-hveid=”CAsQAw” data-ved=”2ahUKEwjN4eeTk-DqAhUUQH0KHfG4BS4QFSgCMAF6BAgLEAM”>
</div></div></div></div> - [adinserter block='9']
-
The AuraEnabled annotation enables Lightning components to access Apex methods and properties.
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.
Log In to reply.