Call Apex Action

    0

    2

    lucycodes42

    Apex recipes

    Shortcut: aura_call_apex_action

    var actionName = component.get("c.methodName");
    actionName.setParams({
      "paramName" : value
    });
    actionName.setCallback(this, function(response) {
      var state = response.getState();
      if (state === "SUCCESS") {
        var returnValueVar = response.getReturnValue();
      }
      else if (state === "ERROR") {
        var errors = response.getError();
      }
    });
    \$A.enqueueAction(actionName);
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.