You need to sign in to do that
Don't have an account?
Filipe Baradelli
Error: Erro de compilação: unexpected token: '='
This code gives me the error : unecpected token '='. It is about the fisrt '='.
I don't know why this.
Can some one help me?:
I don't know why this.
Can some one help me?:
Product2 pr = new Product2(); pr.Name = 'PRODUTO TESTE'; pr.isActive=true; insert pr; PriceBook2 customPriceBook = new PriceBook2(); customPriceBook.Name='Custom Pricebook'; customPriceBook.IsActive=true; insert customPriceBook; Pricebook2 customPriceBookRec=[select Id from Pricebook2 where id=:customPriceBook.Id]; Id stdPriceBookRecId = Test.getStandardPricebookId(); PriceBookEntry customPriceBookEntry = new PriceBookEntry(); customPriceBookEntry.Product2Id=pr.Id; customPriceBookEntry.Pricebook2Id=customPriceBookRec.Id; customPriceBookEntry.UnitPrice=1000; customPriceBookEntry.IsActive=true; insert customPriceBookEntry; Opportunity opp = new Opportunity(); opp.Name = 'Test'; opp.CloseDate= System.Today(); opp.StageName='Prospecting'; insert opp; OpportunityLineItem oppLineItem = new OpportunityLineItem(); oppLineItem.OpportunityId = opp.Id; oppLineItem.PricebookEntryId = customPriceBookEntry.Id; oppLineItem.UnitPrice =1000; oppLineItem.Quantity =1; insert oppLineItem;
let us know if this will work
And is the same error, about the '=' .