0

I am fairly new to salesforce and I am having a bit of trouble with apex code.

trigger HelloWorld on Lead (before update) {
    for (Lead 1 : Trigger.new) {
        1.FirstName = 'Hello';
        1.LastName = 'World';
    }

}

I am trying to run the code above and I keep getting the error

Error: Compile Error: expecting an equals sign, found '1' at line 2 column 14

What does the error mean and what can I do to fix it?

1
  • 1
    Change the 1 to an l in all places where you have 1
    – Eric
    Commented Apr 26, 2017 at 14:33

1 Answer 1

0

Variable should not start with number. You are using 1 so compilation error.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .