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
SFDC DummySFDC Dummy 

Custom Button To send mail to specific mail Id

Hi all

I have created a custom button.i want to send mail when i press the button .its working perfectly.but i need to send to specific id like owner of this object and one more id not to all

 
if({!ISBLANK(KYC__c.Email__c)}) 
{ 
alert('Add "KYC sent to" email address'); 
} 
else 
{ 
{!REQUIRESCRIPT("/soap/ajax/16.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/16.0/apex.js")} 
var msg =sforce.apex.execute("SendkycEmail","kycSendEmail",{id:"{!KYC__c.Id}"}); window.alert(msg); 
}

 
kumar tanwarkumar tanwar
Hello ,
You can add another Parameter in execute Method Like:-
var msg =sforce.apex.execute("SendkycEmail","kycSendEmail",{id:"{!KYC__c.Id}"}, {AnotherId:"{!anotherId});
Thanks..
SFDC DummySFDC Dummy
if i want to like mail id abc@gmail.com,xyz@gmail.com.then only mail sent to this mail id
kumar tanwarkumar tanwar
Hello .
Yes..
SFDC DummySFDC Dummy
But its not working like i have created if({!ISBLANK(KYC__c.Email__c)}) { alert('Add "KYC sent to" email address'); } else { {!REQUIRESCRIPT("/soap/ajax/16.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/16.0/apex.js")} var msg =sforce.apex.execute("SendkycEmail","kycSendEmail",{id:"{!KYC__c.Id}"},{"abc@gmail.com"},{"xyz@gmail.com"}); window.alert(msg); }