I tried the following SOQL and tried to use the ProductCode but getting the error as given below.
for(PriceBookEntry pbe: [Select p.UseStandardPrice, p.UnitPrice, p.ProductCode, p.Product2Id, p.Pricebook2Id, p.Name, p.Id From PricebookEntry p where p.ProductCode in : lstProdCode]) {
mapPbe.put(p.ProductCode,pbe);
}
Compilation error: Variable does not exist: p.ProductCode
Any suggestions please. Thanks.