You need to sign in to do that
Don't have an account?

Error: Compile Error: expecting an equals sign, found '1' at line 2 column 14
I was doing a APEX Tutorial and my first task was to write a trigger using my Salesforce Developer Org and received the following error:
Error: Compile Error: expecting an equals sign, found '1' at line 2 column 14
Any ideas would be appreciated.
[Hello World Trigger]
trigger HelloWorld on Lead (before update) {
for (Lead 1 : Trigger.new) {
1.FirstName = 'Hello';
1.LastName = 'World';
}
}
Error: Compile Error: expecting an equals sign, found '1' at line 2 column 14
Any ideas would be appreciated.
[Hello World Trigger]
trigger HelloWorld on Lead (before update) {
for (Lead 1 : Trigger.new) {
1.FirstName = 'Hello';
1.LastName = 'World';
}
}
Replace 1 with another variable name like lead1.

Thank you Terence. It worked great!