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
98765432109876543210 

Trigger doubt

I created student custom object and lookup relation with account object.

I created one custom field(No of student records) in account object.

when ever i created record or deleting record the custom field in account object  should update..

How to write trigger...

 

 

If it is possible please write the comments of that trigger why we r writing that line...

 

Tim BarsottiTim Barsotti

This could be done via triggers. However, it could also be done if you change the relationship to Master-Detail and then have a roll-up summary field on the account object.