• #31569

    What is the difference between Action support and Action function in Salesforce?

    What is the difference between Action support and Action function in Salesforce?



    Hello Avnish,

    The difference between Action support and Action function is:

    Action function :

    1.Using Action Function, we can invoke AJAX using Java script .

    2. It provides support for invoking controller action methods directly from JavaScript code using an AJAXrequest

    3. It is used when we need to perform similar action on various events. Even though you can use it in place of actionSupport as well where only event is related to only one control.

    Action support:

    1. Using Action Function,we can directly invoke method from controller.
    2. 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.
    3. It is used when we want to perform an action on a particular event of any control like onchange of any text box or picklist.
    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.

    Salesforce | Parul Parul #2

    Action Function: Invoke the controller method from java script using AJAX and we can use action function from different places on visual force page.
    Action Support: Invoke the controller method using AJAX when event occurs on page like onMouseOver, onClick, etc. and we can use action support for particular single apex component.




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?