You need to sign in to do that
Don't have an account?
iperez_genius
I wrote this code i was wondering if anyone can advise how to make it more efficient as i am not sure how well it will fair up against thousands of records.
Ilan
testing efficiency??
Code:
trigger updateLead on Task (after insert) { Lead[] leadsToUpdate; Task[] taskEdit; for (Task t: Trigger.new) { leadsToUpdate = [select id, SentInfoPack__c, email from lead]; taskEdit =[select whoid, subject from task]; for (Lead ltu : leadsToUpdate) { Lead[] leadInserts; for (Task tsk : taskEdit) if ((tsk.whoid == ltu.id) && (tsk.subject == 'mailMerge266')) { if (ltu.SentInfoPack__c == 'no') { ltu.SentInfoPack__c = 'yes' ; update ltu; } } } } }
I wrote this code i was wondering if anyone can advise how to make it more efficient as i am not sure how well it will fair up against thousands of records.
Ilan