It explains about how to do Rollup using Apex Trigger and Count() function in Aggregate result query.
Scenario:
When a Contact is Created or deleted then calculate the "No Contacts" on Account.
References:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_SOQL_agg_fns.htm
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers.htm
https://trailhead.salesforce.com/en/content/learn/modules/apex_triggers/apex_triggers_intro
Download
0 formats
No download links available.
Apex Trigger (Rollup Summary with Apex Trigger) | NatokHD