+ Start a Discussion
babacandoitbabacandoit 

Trigger Error ?

Hi All,

I am getting error as  "Error Error: Compile Error: Variable does not exist: hander at line 16 column 9"
for below lines of code ? 

Please some one can help me..

trigger assignSp on Account (before insert, before update, After insert, After Update) {

    AssignSpHandler handler = AssignSpHandler.getInstance();
   
    if(Trigger.isBefore && (Trigger.isInsert ||Trigger.isUpdate)){
        handler.assignSp(Trigger.new);
    }
   
    if(Trigger.isAfter && (Trigger.isInsert ||Trigger.isUpdate)){
        hander.changeContactOwner(Trigger.new, Trigger.oldMap);
   
    }
}

-----
Thanks in advance
Cheers..
Baba
Best Answer chosen by babacandoit
Deepak Kumar ShyoranDeepak Kumar Shyoran
This is because you misspelled hander which should be handler.

All Answers

Deepak Kumar ShyoranDeepak Kumar Shyoran
This is because you misspelled hander which should be handler.

This was selected as the best answer
babacandoitbabacandoit
Thanks @Deepak :)
This what happens to me, when i eat less and Sleep LESS ..LOL :\


Cheers..
Baba
Deepak Kumar ShyoranDeepak Kumar Shyoran
No Problem sometimes it happen with all and able to resolve until some else review their code.