+ Start a Discussion
chandra prakash 58chandra prakash 58 

need to write a trigger using handler class.

I have three custom object target__c and targetLine__c, employee__c.
In target __c i have a field name employee__c(lookup) with employee__c object.
in Employee__c have a self lookup field name manager__c.
Criteria:  when record creates in target__c object.
Action: automatically crate the record in targetline__c based upon the employee. (e.g. if in an employee is the manager of three other employees then. then create three orderLine__ record.)
ShirishaShirisha (Salesforce Developers) 
Hi Chandra,


Please find the sample trigger and handler class in the below blog and make changes according to your requirement.


Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri