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
Chidanand MChidanand M 

Difference between commandLink, ActionSupport and actionFunction

Hi folks,

Could anyone plz explain me the exact difference b/w,
commandLink,
actionSupport and
actionFunction 

With some scenarios.
When to use them perticularly, in which scenarios.
It is confusing a lot between the 3.
I know them individually,
NagaNaga (Salesforce Developers) 
Hi Chidu,

Commandlink:
A link that executes an action defined by a controller, and then either refreshes the current page, or navigates to a different page based on the PageReference variable that is returned by the action. An <apex:commandLink>component must always be a child of an <apex:form> component.

Action Support:
A component that adds AJAX support to another component, allowing the component to be refreshed asynchronously by the server when a particular event occurs, such as a button click or mouseover.

Action Link:
A component that provides support for invoking controller action methods directly from JavaScript code using an AJAX request. An <apex:actionFunction> component must be a child of an <apex:form> component.

Please check out the below link s for examples and scenarios on all the above apex methods.

https://www.salesforce.com/docs/developer/pages/Content/pages_compref_commandLink.htm

https://www.salesforce.com/docs/developer/pages/Content/pages_compref_actionSupport.htm

https://www.salesforce.com/docs/developer/pages/Content/pages_compref_actionFunction.htm

Best Regards
Naga Kiran
Ajay Nagar 7Ajay Nagar 7
1.Commandlink: Executes a function defined in a controller synchronously.
2.ActionSupport: Provides AJAX support to another component that is executes function defined in controller asynchronously.
3.ActionFunction:Executes function defined in controller directly from JavaScript code using an AJAX request.