0

Is there a way to set a trigger to generate a mail merge once a field has been checked? I want to generate a donor thank you letter (mail merge document already created and successfully tested) automatically when an opportunity is posted (picklist field). The merged document should be sent to the same user for mailing every time regardless of who closes the opportunity. The closest I have been able to get is to trigger a task for said user to complete the mail merge. I'm hoping to eliminate that step and generate the merged document automatically.

3
  • Salesforce doesn't have built-in document merge functionality. You'll have to get a 3rd party package (see AppExchange) or export a CSV and manually merge in Word. Feb 13 at 23:02
  • I already have the mail merge figured out within Salesforce utilizing the "mail merge" button on several objects. I'm asking about a trigger to fire an action.
    – Andy Jones
    Feb 14 at 1:08
  • The mail merge functionality can only be operated via the UI, not apex. To do mail merge via apex you would need to code up the whole document generation and emailing process itself. You can't use the native mail merge via apex.
    – gorav
    Feb 14 at 13:36

Your Answer

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

Browse other questions tagged or ask your own question.