Close CRM card programmatically

Hello devs,

Does anyone know how to close a CRM card programmatically when we click on a button inside the CRM card?

Thanks.

Hey, @IBuddhika :waving_hand: Thanks for reaching out. Let’s invite some of our community members to give their insights — hey @coldrickjack @PAtlan @himanshurauthan, do you have any tips or thoughts on how you’ve dealt with this when creating CRM cards?

Best,

Jaycee

Hello Jaycee,

Thank you for calling other devs for help.

I could find the solutions here.

We just needed to add simple line of code on button click.

window.parent.postMessage(JSON.stringify({“action”: “DONE”}), “*”);

It did the trick.

Thank you very much for coming back and sharing what worked for you :raising_hands: — Jaycee