Saturday, July 2, 2011

Send Email When Create A Task Using Apex Script


Use the given script while creating a task if you want send an email to assigned email Id.

Task t = new Task(Subject='Follow-up');
Database.DMLOptions dmlo = new Database.DMLOptions();
dmlo.EmailHeader.triggerUserEmail = true;
database.insert(t, dmlo);

No comments:

Post a Comment