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
SUJAY GANGULY 5SUJAY GANGULY 5 

Can anyone give some example requirment which help me practice triggers?

JeffreyStevensJeffreyStevens
Write a trigger on a custom object that has a lookup field to Account.  Count the number of records in the related object that are associated with that account, and update a field on the account with that number.  (ie - emmulate a roll-up summary field, on an object that is NOT a master-detail) relationship.

Be sure that the trigger is bulkified (ie - will accept upto 200 triggered records at one-time, with no limit errors).

Write test code coverage, to cover 90%+ of the lines in the trigger.