You need to sign in to do that
Don't have an account?
Pranav Chitrans
Trigger syntax error unexpected
Can anyone plz tell what is the error.. I totaaly got pissed now... it shows error
Error: Compile Error: unexpected token: '{' at line 11 column 4
Error: Compile Error: unexpected token: '{' at line 11 column 4
trigger feesCheck on Test__c (before insert, before update) { for(Test__c f : trigger.new) { if(trigger.isInsert && f.Fees__c < 1000) { f.addError('incorrect data 1000'); } else(trigger.isUpdate && f.Fees__<1500 ) { f.addError('greater than 1500'); } } }
Just a little mistake but please take care of this thing in future that you cannot add a condition in else statement.
Please correct your code as follows :
I have done modification at line no. 10.
Regards,
Abhishek