You need to sign in to do that
Don't have an account?
W Chad Smith
Quick Action Lightning Web Component (Headless) Calling Apex
I am trying to get a LWC to work as a headless quick action. Everything isi working fine, but I'm un sure of how to call my Apex method with a parameter. Here's the JS
import { LightningElement, api } from 'lwc'; import doAssignment from '@salesforce/apex/CaseAssignment.doAssignment'; export default class caseSubmitToManagementLWC extends LightningElement { isExecuting = false; @api async invoke() { if (this.isExecuting) { return; } console.log(this.recordId); console.log('Execution Start'); this.isExecuting = true; await this.sleep(2000); this.isExecuting = false; console.log('Execution Stop'); } sleep(ms) { return new Promise((resolve) => setTimeout(resolve, ms)); } }