function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kittu9kittu9 

Difference between @RemoteAction Annotation and <apex:actionFunction> in visual force

If we declare a method with @Remote Action in Apex class we can call that method from the Java script in the visual force page.

 

By using <apex:actionFunction> tag also we can call the apex class function in the java script. 

 

What is the difference between these two? In which situation which one have to use. Please give some info for this. Thanks in advance.

Best Answer chosen by Admin (Salesforce Developers) 
Bhawani SharmaBhawani Sharma
1. Using action function, you can call only same class function.
2. Remote Action returns the results from the class in Javascript.
3. Action function submit the page, Remote action doesn't

All Answers

Bhawani SharmaBhawani Sharma
1. Using action function, you can call only same class function.
2. Remote Action returns the results from the class in Javascript.
3. Action function submit the page, Remote action doesn't
This was selected as the best answer
Deepu salesforceDeveloperDeepu salesforceDeveloper
action function does not support call back from java script,
but remote action supports call back from java script