Sometimes we have Requirement to have a number of Counts of Contact on Account, just like Rollup Field Salesforce. But Salesforce has provided Rollup Summary Field on the Master-Detail Object. Below is Sample code for the Same. Apex Trigger : trigger trgContactTrigger on Contact (before insert, after insert, before update,after update,after Delete) { ContactTriggerHandler objClass … Continue reading Custom Roll up With Apex Trigger.
Trigger To check Duplicate on Lead Using Email and Phone
The above functionality can be achieved by duplicate rules. But as we are into coding we will be writing trigger for it. We will be writing Trigger and Handler for it. The best practice for writing a trigger and Calling the apex class in which we will be writing the business logic for it. Apex … Continue reading Trigger To check Duplicate on Lead Using Email and Phone