• Charni Wiggins 4
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies

Fairly new to dev/apex. Just looking for some advice on how to start/structure my trigger as I'm struggling to get it started. 

We want to send emails when Sales Invoices are overdue, to an email address on the related Account (related via lookup from invoice to account). My first thought was to create the trigger from the Account, but can I access the records related via the lookup on Sales Invoice? I couldn't get the SOQL statement working, so thought to do it from Sales Invoice, but that makes no sense as I need to group the Sales Invoices together where there are more than one overdue for each account, which happens more than not. 

Any sugegstions greatly appreciated!