+ Start a Discussion

Email batch jobs

I have a trigger that currently sends an email if a field is checked and the opportunity is at a certain stage. Unfortunately, I do not want to send the email at the time the stage is changed. I want to be able to send all the emails from each instance the trigger is triggered, at one time during a day.


Is there any way to do this?


You could leverage Scheduled/Batch Apex to be able to do this. Look at http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_batch.htm for more information on Batch apex and scheduled apex.