You need to sign in to do that
Don't have an account?
Bharat Chandra Mohanty
how to attach files from notes and attachment to email composer
Hi
I have invoked the standard email composer in lwc ,I am passing to address,body,subject in js.
But i want to add a attachment which is there in notes and attachment.
The referrence Email composer (https://developer.salesforce.com/docs/component-library/documentation/en/lwc/use_quick_actions_email)
How to pass the contentDocumentId in js
Thanks in advance
Hello, I'm facing the exact same issue, and I cannot really find any further documentation on how to use this standard LWC email composer.
Here's the code, ToIds on its own works fine, but adding ContentDocumentIds results in the exception above: If anyone has some knowledge on that, I'm also interested :)So I'm just fumbling in the dark, experimenting. I noticed in the example given on the link you shared, the two fields 'htmlBody' and 'subject' seem to be the ones found on the EmailMessage Object (https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_emailmessage.htm).
So I tried adding the 'ToIds' field for instance, which is a JunctionIdList, and provided a Contact Id for it, and it works: the email composer does open with the said contact prepopulated.
Then I tried populating the field of interest for us: 'ContentDocumentIds', which is also a JunctionIdList field on the EmailMessage Object, but I get an uncaught exception in javascript...
Any knowledge on how to attach files would be greatly appreciated