+ Start a Discussion

Count Number of Cases on the Account

I need to create an APEX Trigger that will sum all Cases (Opened in the Last 7 Days) to a field on the Account Level.  But, I am APEX defficient...  ANy suggestions or ideas?


Problem is your target is a moving target, and Apex code only runs when a record is edited. Therefore, without a Scheduled class that calls a Batch Class, you'll probably not get the desired results. I would recommend you just create a custom link to a report to query this data.


Thank you for the feedback but, if I create a custom report, it will include all Accoutns that only have (1) associated case opened within the last 7 days.  I am hoping to FILTER OUT all Accounts that only have one case opened within the last 7 days.  Would that be possible with your suggestion?