You need to sign in to do that
Don't have an account?
Nitish Kulkarni
Trigger before update problem
Can anyone please answer this question and explain
Q. A lead object has a custom feld Priorr_mailrrc. The following trigger is intended to copy
current email into the Priorr_mailrrc feld anytme the email feld is changed
trigger test on Lead (before update) {
for (Lead ld: trigger.new) {
if (ld._mail ! = trigger.oldMap.get(ld.id)._mail) {
ld.Priorr_mailrrc = trigger.oldMap.get(ld.id)._mail;
update ld;
}
}
}
Which type of excepton will this trigger cause?
a. A compile tme excepton
b. A null reference excepton
c. A DML exception
d. A Limit _excepton when doing a bulk update
Use this code