Activity Forums Salesforce® Discussions How can we call a controller method from JavaScript in Salesforce?

  • Marziya

    Member
    January 22, 2020 at 2:37 pm

    Hello Ratnesh,

    Use apex:actionFunction within vf page and define “action” attribute to Function to call. For e.g

    <apex:actionFunction action=”{!displayMethod}” name=”displayMethod”/>

    here action=”{!displayMethod}” is my function name to call and within javascript call name attribute within action function according to your condition.

    Thanks.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos