List Java Script Button : Add Cc's to email

  • 11 February 2019
  • 1 reply
  • 8 views

Hi ,

 

I am using javascript list button to send email to customers with pdf in salesforce. This is my button code

 

{!REQUIRESCRIPT("/soap/ajax/26.0/connection.js")} 
{!REQUIRESCRIPT("/support/console/26.0/integration.js")} 

var ids = {!GETRECORDIDS($ObjectType.Invoice__c)}; 
if (!ids || ids.length < 1) 
alert("Please select at least one record."); 
else 

var redirectUrl = "/apex/loop__masslooplus?&retURL=" + encodeURI(window.location.pathname+window.location.search); 
redirectUrl += "&recordIds="+ids.join(","); 
redirectUrl += "&sessionId={!$Api.Session_ID}"; 
redirectUrl += 
"&contactField=Email_Contact_Id__c&hidecontact=true&hideddp=true&autorun=true&attach=true&ddpIds=a09M000000G5tDE&deploy=a07M000000AarH1"; 
window.location.href = redirectUrl; 
}

 

Now, i want to add some cc address in my email. I have added cc address in drawloop template .

 

40iFA44526F322CE1CA.png

When run this javascript button , emails are not going to customer.

 

How to automate the CC functionality on mass drawloop?

 

Do we need to change the tags in javascript button code to auto send emails to cc address ?

 

Please help me !!

 

Thanks

 

 


1 reply

If you were to paste your CC tags into a template, does the data merge as expected? The fields being used appear to be formula fields, so I'd recommend validating that the results are as expected and are not going to break the email. Also be sure to verify that the deployid in your button is the correct delivery option.

Reply