• #19434
    Salesforce | Suraj Suraj #162

    What is difference between Action support and Action function in salesforce?

    What is difference between Action support and Action function?


    Salesforce | Manpreet Manpreet #706

    Hi suraj,

    1. difference is in case of Action function we invoke AJAX using Java script while in case of Action support we may directly invoke method from controller

    2. other difference is Action function may be commonly used from different place on page while action support may only be used for particular single apex component.


    Just Try out this example http://www.cloudforce4u.com/2013/06/difference-between-action-support-and.html


    Salesforce | shariq shariq #1



    apex:ActionFunction : This component helps to envoke AJAX request (Call Controllers method) directly from Javascript method. It must be child of apex:form.
    <apex:actionFunction name=”sendEmail” action=”{!sendEmailFunction}”>


    apex:ActionSupport : This component adds Ajax request to any other Visualforce component. Example : Commandlink button has inbuilt AJAX functionality however few components like OutputPanel does not have inbuilt AJAX capabilities. So with the help of this component, we can enable AJAX.

    <apex:outputpanel id=”counter”>
    <apex:outputText value=”Click Me!: {!count}”/>
    <apex:actionSupport event=”onclick” action=”{!incrementCounter}” rerender=”counter” status=”counterStatus”/>

    Hope his helps.

    Hope this helps.

    Salesforce | Parul Parul #2


    These are the AJAX action tags that support the calling of action and refresh the field only not the entire Visualforce page.

    1. <apex:actionFunction> – 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.

    1. Both action support and function can be used to call a controller method using an AJAX request.
    * for example call controller onclick of a inputcheck box
    * or call a controller method onfocus of a input field
    Well, they both do the same thing of calling controller method.

    Difference between both:

    1. Action function can call the controller method from java script.
    2. Action support adds AJAX support to another visualforce component and then call the controller method.
    for example:

    <apex:outputpanel id=”outptpnl”>
    <apex:outputText value=”click here”/>
    <apex:actionSupport event=”onclick” action=”{!controllerMethodName}” rerender=”pgblck” />

    Here action support adds AJAX to output panel, so once you click on output panel controller method will be called.

    3. Action function cannot add AJAX support to another component. But from a particular component which has AJAX support(onclick, onblur etc) action function can be called to call the controller method.

    <apex:actionFunction name=”myactionfun” action=”{!actionFunMethod}” reRender=”outptText”/>
    <apex:inputcheckbox onclick=”myactionfun” />





Viewing 4 posts - 1 through 4 (of 4 total)

Please to reply to this topic.


We're not around right now. But you can send us an email and we'll get back to you, asap.


About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2019 Forcetalks. All Right Reserved.

Log in with your credentials


Forgot your details?