Saturday, December 1, 2018

What is Remote Action in Salesforce?

In this blog, we will learn how to use Remote Actions in Visualforce Page.

But what is a Remote Action? 

Remote Action is a way to access Apex method using Javascript in your Visualforce page.
It allows you to create pages with complex, dynamic behavior that isn’t possible with the standard Visualforce AJAX components.

Remote action method should always have the @RemoteAction annotation and it should be Static.

Let's take an example where we need to retrieve the first five Cases with Status to New.


Point to remember:

  • @RemoteAction annotation is mandatory
  • Remote Action methods should always be static
  • If you are using the Visualforce Page inline in a Page Layout, then the method should be declared as global instead of public

No comments:

Post a Comment