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
sddodsonsddodson 

Apex trigger?

I need to be able to send an email to certain contacts on an account when an invoice related to that account (master-detail relationship between the account and the invoice custom object) reaches 30 days outstanding.  The specific  contacts are distinguished by check boxes.

 

I don't see a way to do this with workflow rules.  I am thinking an apex trigger is the way?

 

Any guidance would be greatly appreciated.

(I have not written a trigger before so please keep this in mind when explaining : )  )

sfdcfoxsfdcfox
Not a trigger, but you're close. You'll need "Scheduled Apex Code" that runs nightly and sends out the emails without changing your data model. Alternatively, you may be able to use Account Contact Roles to identify the contacts to notify; this can be achieved with a workflow rule, but you'll have to restructure your data, of course.