Use this link to share with your colleagues:
How to Create a Mail Merge Button in Lightning: https://help.pm.leapevent.tech/a/1064856
Mail merges allow you to automate your donation acknowledgment process. Salesforce hasn't brought the mail merge feature to Lightning yet, but don't worry - we've got you covered.
In this article, we'll show you how to create a one-click button that runs the mail merge process straight from the donation record you're on. There are two major steps to this process:
Setting up this button should take about 15 minutes. Let's get going!
Learn more about setting up mail merge templates to use within PatronManager here.
1. First, you'll need to create the button
The code behind the button populates the letter with information from the specific record automatically.
1.4. Match these settings
- Label: Mail Merge
- Description: Creates a Mail Merge from the Donation record.
- Display Type: Select "Detail Page Button"
- Behavior: Select "Display in existing window without sidebar or header"
- Content Source: Select "URL"
-
URL: Paste the following text:
https://<CLASSIC DOMAIN>.salesforce.com/mail/mmchoose.jsp?id={!Opportunity.Id}&1={!Opportunity.Name}&retURL=https://<LIGHTNING DOMAIN>.lightning.force.com/lightning/r/Opportunity/{!CASESAFEID(Opportunity.Id)}/view?0.source=alohaHeader
Don't click Save yet! We've still got work to do on this screen.
1.5. Update the Classic Domain in the URL with your organization's information
You'll replace CLASSIC DOMAIN with OrgName.My.
For example, if your URL looked like this...
https://wonderfuled.lightning.force.com/lightning/setup/ObjectManager/Opportunity/ButtonsLinksActions/newButtonOrLink
You'd replace CLASSIC DOMAIN with WonderfulEd.My
You'll replace CLASSIC DOMAIN with the same letter and number combination.
For example, if your URL looked like this...
https://na54.lightning.force.com/setup/ObjectManager/Opportunity/ButtonsLinksActions/newButtonOrLink
You'd replace CLASSIC DOMAIN with na54.
1.6. Update the Lightning Domain in the URL with your organization's information
Replace <LIGHTNING DOMAIN> with everything after https:// and before .lightning.force.com in the web address of this webpage. The text in red below is what we need:
https://wonderfuled.lightning.force.com/lightning/setup/ObjectManager/Opportunity/ButtonsLinksActions/newButtonOrLink
or
https://na54.lightning.force.com/setup/ObjectManager/Opportunity/ButtonsLinksActions/newButtonOrLink
1.7. Double check your updated URL and click "Save"
Your URL should now look something like this:https://WonderfulEd.my.salesforce.com/mail/mmchoose.jsp?id={!Opportunity.Id}&1={!Opportunity.Name}&retURL=https://WonderfulEd.lightning.force.com/lightning/r/Opportunity/{!CASESAFEID(Opportunity.Id)}/view?0.source=alohaHeader
Or this:
https://na54.salesforce.com/mail/mmchoose.jsp?id={!Opportunity.Id}&1={!Opportunity.Name}&retURL=https://na54.lightning.force.com/lightning/r/Opportunity/{!CASESAFEID(Opportunity.Id)}/view?0.source=alohaHeader
2. Then, add the button to your page layouts
You can't use the button if you can't see it on each record!
If you're unfamiliar with page layouts, you can learn more about them here.
2.2. Use the dropdown arrow to click "Edit" on the first page layout where you'd like to see this button
2.3. Click "Mobile & Lightning Actions" on the page layout palette
2.5. Scroll to the top and select the next page layout you'd like to add the button to
We recommend adding the mail merge button to any page layout used for donations given by an individual. For example, we recommend adding the button to:
- Donation Layout
- Major Gift Layout
- Matching Donation Layout
- PatronTicket Donation
- Pledge Layout
- Pledge Payment Layout
2.6. Repeat these steps as needed for each page layout; when you're done, click "Save"
I've added the button to my page layouts, but it's not working!
If you receive a message that reads "Unsupported Browser For Mail Merge This feature requires Internet Explorer for Windows 6.0 or higher on Microsoft Windows 2000 or Windows XP," you'll need to adjust a setting for your Mail Merge button to work.