In trying to use a query based on product standard object in a Batch Apex program.

select name from product/products returns error even in Developer console.

Errors :

sObject type 'Product' is not supported.

select name from products ^ ERROR at Row:1:Column:18

sObject type 'products' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.

Please advice.

Thanks all. Yes Product2 query is working.

  • If your question is answered, you can press the checkmark in order to mark an answer as "correct". This will, not only give you and the other person points, but it'll help others find answers.
    – user18041
    Commented Jun 17, 2015 at 15:36

2 Answers 2


The product object is actually called 'Product2'.

From the documentation

Products are represented by Product2 objects. The Product object is no longer available.

Try changing your SOQL to something like below

list<Product2> products = [Select Id, Name From Product2];

Ninja is right product object is no more available in salesforce now its product2. so you have to query like this [Select Id,Name from Product2 Where Product2.Name !='null'];

for more information check this link http://www.infallibletechie.com/2013/08/how-to-query-product-object-in.html


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .