function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
W Chad SmithW 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));
    }

    
}