Activity Forums Salesforce® Discussions How to call apex method with parameter in the lightning web component?

  • How to call apex method with parameter in the lightning web component?

    Posted by Shweta on December 14, 2020 at 7:02 pm

    How to call apex method with parameter in the lightning web component?

    Aditya replied 4 years ago 2 Members · 1 Reply
  • 1 Reply
  • Aditya

    Member
    December 15, 2020 at 7:41 am
    1. First, import the Apex method into the JS.
    2. If it is wired, make sure cacheable=true decorator is set.
    3. Parameters are passed as an object.
    4. For simple results: wire to a property.
    5. For some processing: wire to a function.
    6. For controlling when to call: imperative

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos