You are enlightening us, what a teacher and what a work....although I never met... You we all miss you. By God's Grace Let your soul be in peace and love.
trigger LeadTrigger on Lead (before insert,before Update) { if(trigger.isBefore && (trigger.isUpdate || trigger.isInsert)){ for(Lead ld : trigger.new){ Integer num= [Select count() from Lead Where Email =: ld.Email and Phone =: ld.Phone]; if(num > 0){ ld.addError('Duplicate Record found with same Email and Phone'); } } } }
You are enlightening us, what a teacher and what a work....although I never met... You we all miss you. By God's Grace Let your soul be in peace and love.
Can we get complete videos ?i guess some videos are missing
I miss you sir...
Any one write the quare
Does anyone know the solution for last assignment, please share.
trigger LeadTrigger on Lead (before insert,before Update) {
if(trigger.isBefore && (trigger.isUpdate || trigger.isInsert)){
for(Lead ld : trigger.new){
Integer num= [Select count() from Lead Where Email =: ld.Email and Phone =: ld.Phone];
if(num > 0){
ld.addError('Duplicate Record found with same Email and Phone');
}
}
}
}
@@satyagayathri1615 Try to avoid writing SOQL and DML stmts in loops, its might get over goverlimits if data is huge