Activity › Forums › Salesforce® Discussions › How to pass JavaScript variable value to Apex Controller? Tagged: Javascript, Salesforce Apex, Salesforce Apex Controller, Salesforce SOQL Salesforce® Discussions How to pass JavaScript variable value to Apex Controller? Posted by Karen on April 25, 2016 at 11:17 AM Please explain how to pass JavaScript variable value to apex controller? shariq replied 7 years, 7 months ago 5 Members · 4 Replies JavascriptSalesforce ApexSalesforce Apex ControllerSalesforce SOQL 4 Replies Abhinav Member April 25, 2016 at 11:52 AM There are many solutions for this. Please refer her for different solutions :- http://salesforce.stackexchange.com/questions/24666/how-to-pass-javascript-value-to-controller [adinserter block='9'] Ravi Member April 25, 2016 at 11:56 AM You can do this by using ActionFunction and Param tags. Use this link to understand how it works: https://developer.salesforce.com/blogs/developer-relations/2009/10/passing-javascript-values-to-apex-controller.html Parul Member September 20, 2018 at 1:22 AM Hi, Two ways are there: By using hidden field By using apex:param Thanks shariq Member September 20, 2018 at 7:10 PM Hi, You can use apex param. Hope this helps. Log In to reply. Public All Members My Connections Only Me PublicAll MembersMy ConnectionsOnly Me Public All Members My Connections Only Me