Activity Forums Salesforce® Discussions Salesforce Remote Action not working in JavaScript?

  • Manpreet

    Member
    April 26, 2018 at 4:46 pm

    Hi saurabh,

    The problem is because you're uploading the javaScript file via static resource, but all {!####} expressions are been compiled on page load and not in the static resource.You need to Add the remote action name as a hidden input field on the page, like this:

    <input id="remote_action" type="hidden" value="{!$RemoteAction.MSSPageController.updateHopscotch}"/>
    And then fetch the value of the input by the Id and pass it to the remote manager.

    Thanks.

  • Aman

    Member
    April 26, 2018 at 8:35 pm

    Hi Saurabh,

    Can you please share you code where you are using remote action in JavaScript. Without looking at the code no one tells what it is that causing the actual issue. It may be syntax error that prevent remote action from working.

    Thanks

  • Avnish Yadav

    Member
    September 30, 2018 at 4:23 am

    Hello,

    kindly share the code.

    Thanks in advance.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos