+ Start a Discussion
Shavi DabgotraShavi Dabgotra 

How to call a wire method in OnClick of another button

Hi everyone!
Can someone tell me How can we call a wire method in another method in lightning web component?
As I want to call below method:
    this.wiredActivities = value;
    const { data, error } = value;
      let dataEditing = JSON.parse(JSON.stringify(data));
    }else if(error){
    this.error = error;
In another method as: 

How to call in this?
Thank you in advance!

Hii Shavi Dabgotra
Try The Following Code
<lightning-button access-key={item.id} onclick={handleNavigation2}></lightning-button>

let id = event.target.accessKey;
      currentPageid: id 
      .then((result) => {
           let dataEditing = JSON.parse(JSON.stringify(result));
      .catch((error) => {
          this.error = error;
Please Mark it as Best Answer If It Helps
Thank You!