Skip to main content
Hi, Please check, there is a wireMethod which returned the value from apex

@wire(fetchRecord, {searchKey:'$searchKey', selectedLabel:'$selectedLabel'})recorddetails;

There is an Id value in recorddetails. I need to pass this value of Id in another variable for another invocation.

Could you please mention, how can i retrieve the value of recorddetails.Id

I shall be grateful to you for your kind cooperation.

Thanks and regards

@wire(fetchRecord, {searchKey:'$searchKey', selectedLabel:'$selectedLabel'})recorddetails;

 
3 answers
  1. Jun 23, 2022, 1:53 PM
    find out

     const searchKey = event.target.value;//this.template.querySelector('lightning-input').value;

            this.searchKey = searchKey;

            this.parentId1 = JSON.stringify(this.recorddetails.data);

           this.parentId1 = JSON.parse(this.parentId1.trim())//this.parentId1.trim();

            this.parentId = this.parentId1[0].Id;

            console.log('this.parentId---->', this.parentId);
0/9000