I have requirement to display a data table based on the row actions of another data table through pop-up.

I have done the pop-up through row actions But I am unable to pass the id of the row to the @wire object to get the query and display in the data table.

Please find the JS below.

@track currentRecord1 = [] ;

@wire(showGradingSamples, {recordId : '$currentRecord1'})
    let currentRecord1 = [] ;

    showGradingSamples({lstprodId1s: currentRecord1});

    this.isOpenGradingSample = true;

    return currentRecord1;

How can I pass the id?

1 Answer 1


Just assign a value to tracked variable.

this.currentRecord1 = [row.Id];

This will cause the wire method to dispatch. No need for the local variable or anything else you've done here. You do not call wire methods as you would an imperative Apex call.

If you want all the values to be selected cumulatively, you can also:

this.currentRecord1 = [...this.currentRecord1, row.Id];

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .