function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

How to capture a mail merge document ID

Is there a way to capture a mail merge document ID when it is being sent out? Please include code sample if there's one.



Hai Paul, 

Can you explain a bit more, how to create a mail merge document id and if there can be any steps to replicate. 



Hello Ashish,

Here are the steps to generate a mail merge document:
1. click on any opportunity record
2. click on Mail Merge button under Activity History related list
3. select an opportunity record to merge
4. select a mail merge template
5. click on Generate button and you are done here

When you click on the Generate button a mail merge document will be created and be sent to the record owner's email automatically. However I also like to send this mail merge document to the Notes & Attachment in opportunity automatically as well. Is it possible?

Hi , 

This is currently not possible but there is an idea on the Idea exchange, 

Extended Mailmerge: automatically attach document to record

Also see the thread below, 

How can I make a mail merge be saved automatically as history in the object section (under opportunity)?