0

I've created an LWC with a lightning-output-field pointing to an email field.

<lightning-output-field field-name="myEmailField__c"></lightning-output-field>

It appears to the user as a link. The user has their settings to use "Salesforce Email Composer" as their email editor in Settings->Email->My Email Settings

However, upon selecting the email link, instead of launching Salesforce Email Composer, it launches the user's default email application (i.e. Outlook for this particular user).

How come this isn't respecting the user's choice of email editor?

I've also tried using lightning-formatted-email, but it has the same problem.

Mike

1

lightning-output-field, in the end, gets translated into hyperlink of type email.

<a href = "mailto:abc@example.com?subject = Feedback&body = Message">

And its the browser that opens up in default email client. In your case outlook.

The only way to call the standard Salesforce Send Email is to use Aura's quick action API.

One solution I can think of is if you use lwc inside aura wrapper and provide record level quickAction and use send email functionality of it. You can pass emailId in its parent field.

https://developer.salesforce.com/docs/component-library/bundle/lightning:quickActionAPI/documentation

  • Would this support displaying the email editor to the user? I don't want to send the email programmatically, I want to prompt the user with the Salesforce Email Editor. – Mike Paisner Nov 19 '19 at 23:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.