FavoriteAshmi Patel asked in #ApexOct 18, 2016, 5:51 AMunexpected token: Opportunity at line 6 column 53public class op_trigger{ public void op_check(List<Opportunity> ops) { Double Total_Amount = 0 ; for(Opportunity o1 : [select amount form Opportunity where CreatedDate = Today AND CreatedByID = :UserInfo.getUserID()]) { Total_Amount = Total_Amount + o1.Amount; } for(Opportunity o2 : ops) { Total_Amount = Total_Amount + o2.Amount; if(Total_Amount > 1000000) o2.addError('out of Limit'); } }}4 answersSortSort by Most HelpfulSort by Most HelpfulSort by DateAshmi PatelOct 18, 2016, 7:19 AMthnkuuu allLoadingWrite an answer...BoldItalicUnderlineStrikethroughBulleted ListNumbered ListAdd linkCode blockInsert imageAttach filesLink URLCancelSave0/9000Reply