But what is a Remote Action?
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.
- @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