You need to sign in to do that
Don't have an account?
NecroGiggles
Error: No such column 'ProductId'
I am trying to creat a map to grap the product ID that are added to the "opportunityLineItem" opject so I can show list price on a VF page. I am getting a error when trying to svae the code.
"Error: Compile Error: No such column 'ProductId' on entity 'PricebookEntry'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names. at line 209 column 66"
Am I using the wrong object?
"Error: Compile Error: No such column 'ProductId' on entity 'PricebookEntry'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names. at line 209 column 66"
Am I using the wrong object?
public Map<Id, Double> listPriceMap {get; private set;} List<PricebookEntry> pricebookEntries = new List<PricebookEntry>([select Id, ProductId, UnitPrice from PricebookEntry where ProductId in :productIds]); listPriceMap = new Map<Id, Double>(); for (PricebookEntry pbe : pricebookEntries) { listPriceMap.put(pbe.ProductId, pbe.UnitPrice);
These are Product2Id and procebookEntry2Id..please check and let me know if it works
Thanks
Sandeep
use Product2Id it will work..
P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
Thanks,
Sandeep
Salesforce Certified Developer
Always refer to workbench to get exact field names.
https://workbench.developerforce.com/login.php