You need to sign in to do that
Don't have an account?
nbeekman
Unexpected "=" on populating a list
Hello,
I am getting an error on line 3 - Unexpected "=". Here is what is wierd that it gives this erron in Eclipse and the Development Console but executes fine when done in Execute Anonymous. But last week before summer 13 release it worked fine.
The CreateBaseForTesting() is a class that creates a temporary Oppportunity, Account, Contacts, etc.
Doesn't make sense...
Any suggestions.
Static list<Opportunity> opp; Create_Objects_Helper.CreateBaseForTesting(); opp = [select Name, Id, SW_Pay_MD__c from Opportunity where Name = 'Envysion Test for Deployment' limit 1]; if(opp.isEmpty()) throw new MyException('>>>>>> No Opportunities found. <<<<<<'); //get the factors in the static object Opportunity temp_opp = opp.get(0); temp_opp.Sales_Path__c = 'Operations input required'; temp_opp.Inst_Discount__c = 0.30; System.debug('Updating Opportunities :' + temp_opp); update temp_opp;
Just remove the "static" keyword from the "Static list<Opportunity> opp;". It doesnt make sense inside an function/method
Avi,
Either way it gives the error.
So your code should be looking like this (Can you highlight the line number or post the actual code)
So your code should be looking like this (Can you highlight the line number or post the actual code)