You need to sign in to do that
Don't have an account?
pranavshah
Error: Compile Error: Variable does not exist: First_Name at line 5 column 3
Hi All,
While writing triggers, i am getting below error
Error: Compile Error: Variable does not exist: First_Name at line 5 column 3
Code:
trigger HelloWorld on Lead (before Update)
{
for(lead l: Trigger.New)
{
l.FirstName ='Hello';
l.LastName ='World';
}
}
While writing triggers, i am getting below error
Error: Compile Error: Variable does not exist: First_Name at line 5 column 3
Code:
trigger HelloWorld on Lead (before Update)
{
for(lead l: Trigger.New)
{
l.FirstName ='Hello';
l.LastName ='World';
}
}
Can you verify you don't have an apex class with the name 'l' in your org. If you have, delete it and try to save code again.
Thanks
All Answers
Above code is working for me. are you sure, you posted a right code?
Thanks,
Aman
Error is looking strange. Even you are not using 'First_Name ' keyword in the code, its giveing you above mentioned error.
Can you cross check if you posted a right error.
Thanks
Error: Compile Error: Variable does not exist: FirstName at line 5 column 3
Can you verify you don't have an apex class with the name 'l' in your org. If you have, delete it and try to save code again.
Thanks
Please like the answer and mark it as best if this resolve your issue.
Thanks,
Aman
one more help, if you have scenario based question on trigger & validation rule, will you pleasee share with me on pranav17shah@gmail.com
Thnks in advance