Share Your Experience With Others

Trigger to Count No. of Contacts Related to an Account

You will need to create a number type field on Account object to show the no. of related contacts.

No_Of_Active_Contacts__c is the custom field i have created to count the related contacts.

Trigger.PNG

Handler Apex Class

Handler Class.PNG

You can check the below video to learn more about this trigger.

Any suggestions or changes are welcome!!!!!!!!!!

Leave a comment