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
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?