Activity Forums Salesforce® Discussions What is the use of AuraEnabled Annotation in Salesforce?

  • Anurag

    Member
    July 17, 2018 at 11:41 am

    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

  • Parul

    Member
    September 14, 2018 at 6:48 am

    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.

  • shariq

    Member
    September 14, 2018 at 12:20 pm

    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!

  • Avnish Yadav

    Member
    September 14, 2018 at 12:46 pm

    Hello,

    We use AuraEnabled Annotation in Salesforce so that particular method is available for the Lightning component in Salesforce.

    Thanks.

Log In to reply.

Popular Salesforce Blogs