Search This Blog

Showing posts with label static resource. Show all posts
Showing posts with label static resource. Show all posts

Wednesday, May 7, 2014

VisualForce - Make Remote Action Call from Static Resource

Remote Action in Visual Force gives us the ability to make a call asynchronously to the salesforce controller and handle the response in a callback function without making the complete page refresh or waiting for an action. Basically in terms of HTML, this can be treated as an ajax call made through the script tags.

Controller

Lets check the controller now and assume that the namespace of the package is 'namespace'.
  1. global class ControllerName {
  2.    @RemoteAction
  3.     global static String MethodName(Paramters....)
  4.     {
  5.         return 'Hello';
  6.     }
  7. }
All the remote actions are annotated and static.