Custom button on list view for sending document to multiple contacts

  • 8 September 2017
  • 1 reply
  • 13 views

I originally created a custom list button with the wizard, but now I need to edit it and I'm not a programmer. The button ultimately sends an email to Accounting_Contact1__c. I just need it to ALSO send to Accounting_Contact_2__c.  Can someone tell me what this needs to change to?  

 


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

 

var ids = {!GETRECORDIDS($ObjectType.Accounting_Record__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=Accounting_Contact1__c";
    window.location.href = redirectUrl;
}


1 reply

Badge +7

If you need to send to both in the same email, you can leave the button as it is and use the field tagger add the  Accounting_Contact_2__c email as a CC in the email delivery option.

Reply