+ Start a Discussion
AnugrahaAnugraha 

DML Header option to send email does not work with Ajax toolkit(javascript on custom button)

We have a custom button on detail page. On click of the button, we create a task and we want the user to receive email notification regarding the same. I tried using dml header option but it doesn't work. 

//sample code 
var task = new sforce.SObject("Task"); 
----
----
sforce.connection.emailHeader =  { triggerUserEmail : true};
result = sforce.connection.create([task]);

 
Andy BoettcherAndy Boettcher
Were you able to figure this out?