You need to sign in to do that
Don't have an account?
Srinivasa Amarendra Reddy Vaka
before trigger is updating even for create new record
Hi All,
I am new to Salesforce and I just wrote my first Hello World Trigger on Lead object as below.
trigger HelloWorld on Lead (before update) {
for (Lead l: Trigger.new) {
l.FirstName='Hello';
l.lastName='World';
}
Guess what, this thing is running even when I create new Lead and setting the first and last names to hello world. What am I doing wrong?
- Amar
I am new to Salesforce and I just wrote my first Hello World Trigger on Lead object as below.
trigger HelloWorld on Lead (before update) {
for (Lead l: Trigger.new) {
l.FirstName='Hello';
l.lastName='World';
}
Guess what, this thing is running even when I create new Lead and setting the first and last names to hello world. What am I doing wrong?
- Amar
Did you get the answer to this question, I am also struggling to understand the reason for new record updating
Please choose this as the best answer if it helps.