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
Mattias NordinMattias Nordin 

Execute mailmerge on button click

How do i execute a mailmerge on a hardcoded template on a click of a button on the opportunity object in sales force?

Is this possible?


Yes this is possible via custom code. You can have your own code in VF page wherein on clicking you just show the preview the text to be sent based on you fixed template and have a cancel and send button to send or cancel the action.


Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.



Mattias NordinMattias Nordin

Is there any example code on how to do this. It's easier to get started that way. Thanks =)

Mattias NordinMattias Nordin

I have now created my VisualForce page that contains all information that i want to email to the order office. If i remember correctly it should be possible to convert this webpage to a pdf document. Anyone have a guide on how to do this?


Or can we send the visualforce page directly by email? The recipients will not have access to sales force.


Best regards