Activity Forums Salesforce® Discussions Can we pass whole of the object as a parameter in apex class from the java script controller?

  • Avnish Yadav

    Member
    August 14, 2018 at 11:05 am

    Hello Anurag,

    Yes, you can pass the whole Object as a parameter in apex class from the javascript controller. Here are the simple steps to do this:-

    1. Call the apex class method in javascript by using action =component.set("c.nameOfMethod");
    2.  Then pass the parameter using action.setParams("variableNameInMethod": variableNameInJavascriptController);
    3. Execute the action in javascript.

    Hope this will help you.

    Thanks.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos