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
SapamrmSapamrm 

Custom one-click mail merge button

Hi,

 

Right now the following actions have to be taken to send a single mail merge document:

1. click "mail merge" on the objects activity history related list

2. choose the appropriate template

3. deselect the "log an activity" checkbox

4. click "generate"

 

I would like to create a custom button which performs all of the above actions in one single click.

 

 

The code I've got so far:

 

https://cs3.salesforce.com/mail/mmchoose.jsp?id={!Custom_Object__c.Id}&1={!Custom_Object__c.Name}
&retURL=%2F{!Custom_Object__c.Id}&p7=0&p8=MailMergeTemplateID

 

The first 3 steps are ok, but I still have to manually click "generate".

 

Does anyone know how I should change my code in order to include that last, fourth step in my custom button?

 

 

Thanks in advance! 

 

tomektomek

Hi Sapamrm

Did you find any solution for that? I have the same problem

SapamrmSapamrm

Hi Tomek,

 

Yeah, I did find a solution; just add &Save=1 to the URL of your custom link/button.

This will generate the mail merge automatically.

tomektomek

Thanks for your quick replay. I reviewed all your posts and I tried to do the same. I created custom link

/mail/mmchoose.jsp?id={!Samochod__c.Id}&1={!Samochod__c.Name}&p7&p8="01HD00000009lqN"& Save=1&retURL=%2F{!Samochod__c.Id}

but still I have to click Generate button. Any ideas?

SapamrmSapamrm

Tomek,

 

You have an extra space in front of the "Save=1".

Remove that space and you should be good to go.

tomektomek

Still the same :(

Now my link looks as follow:

/mail/mmchoose.jsp?id={!Samochod__c.Id}&1={!Samochod__c.Name}&p7=0&p8=01HD00000009lqN&Save=1&retURL=%2F{!Samochod__c.Id}

 

maybe I should change something in other settings?

SapamrmSapamrm

Minor s instead of capital s!

 

So save=1, not Save=1 !!

tomektomek

Unfortunately still the same. I don't want to bother you. If you would like to be so kind please look at this link again. Maybe you find another mistake. If not thank you for your time and have a nice weekend.

 

Tom

SapamrmSapamrm

Oh nooo, I really thought that was the problem! I've tried both options (captial and minor letter s) and for me it doesn't work with capital S, but it dóes work with minor S.. Very strange if you ask me..

 

My custom link is as good as identical to yours, and for me all is working fine.

 

Sorry man, but I have absolutely no idea why yours is not working.

 

Normally the save=1 should do the trick..