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

Free 5 Day Salesforce Challenge!

Video in

To access the signup form head over to www.talentstacker.com/Salesforce TalentStacker Podcast Salesforce Episode: https://talentstacker.libsyn.com/how-to-earn-60k-100k-a-year-within-6-months-without-a-college-degree-say-what-salesforce-career-development-path-with-bradley-rice Do you already have a job as a Salesforce Professional and…