+ 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