About this question
I create a quick action button to open the outlook app. and behind the scene I Am using LWC Headless Action to make it happen. and the following code is my complete lwc
TestSendEmail.html
TestSendEmail.js
import { api, LightningElement } from 'lwc';
export default class TestSendEmail extends LightningElement {
@api invoke() {
var uri = "mailto:?subject=Test subject"+"&body="+encodeURIComponent("");
Test Html
console.log("show uri: ", uri);
var a = document.createElement("a");
a.href = uri;
a.click();
}
}
TestSendEmail.js-meta.xml
<?xml version="1.0" encoding="UTF-8"?>54.0
true
lightning__RecordAction
Action
And here the button after added to page layout:
The goal is only to open an outlook app with correctly rendered HTML. Hope someone can help me fix this issue.