Activity Forums Salesforce® Discussions What is @RemoteAction annotation?

  • Himanshu

    Member
    April 30, 2016 at 1:59 pm

    Hi Piyush,

     

    You can use @RemoteAction annotation with static method only. As a result you can't use public variable directly even if remote action is declared in the same controller.
    However, you can pass through public variables via JavaScript as a parameters of remote action.

  • Parul

    Member
    September 18, 2018 at 7:39 am

    Hi,

    Remote action function in salesforce allows user to access any method from any class through javasrcipt methods, and get the result as a javascript object for further manipulation.

    Points to remember while implementing remote action function:

    1.Remote action method should have @RemoteAction annotation.
    2.The method should also be Global and Static

    Thanks

  • shariq

    Member
    September 19, 2018 at 12:27 pm

    Hi,

    The RemoteAction annotation provides support for Apex methods used in Visualforce to be called via JavaScript. This process is often referred to as JavaScript remoting.

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos