function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
bouscalbouscal 

soql query won't return Product lookup from Case, no such column 'Product'

Product is a standard lookup field on the Case object yet a soql query doesn't see it.  I'm an admin.  I have full rights to the object & field.  The field is on a page layout.  Why isn't it available to query?  I also noticed a describe call doesn't return the field either.
 
SELECT ID, Product FROM Case WHERE ID='500L000000DTFao'
           ^
ERROR at Row:1:Column:12
No such column 'Product' on entity 'Case'. 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.


 
Best Answer chosen by bouscal
bouscalbouscal

Appreciate the link Shweta, but it's incomplete.  As you can see from the image here, it's a standard field named Product.  There are other standard fields highlighted here that don't show in that article either.  I read this article (https://help.salesforce.com/articleView?id=cases_fields.htm&type=5) earlier today that mentions the field is only available if entitlements are set up to include products.  

Case standard fields

Even those the case page lists the API as "Product" it's actually ProductID.  Thanks!

All Answers

$hwet@$hwet@
Hi Bouscal,

Please find the link which will give all the standard fields on an object and there is no product field on case. You might be checking a custom field.

https://developer.salesforce.com/docs/atlas.en-us.sfFieldRef.meta/sfFieldRef/salesforce_field_reference_Case.htm

let me know if it helps.
bouscalbouscal

Appreciate the link Shweta, but it's incomplete.  As you can see from the image here, it's a standard field named Product.  There are other standard fields highlighted here that don't show in that article either.  I read this article (https://help.salesforce.com/articleView?id=cases_fields.htm&type=5) earlier today that mentions the field is only available if entitlements are set up to include products.  

Case standard fields

Even those the case page lists the API as "Product" it's actually ProductID.  Thanks!

This was selected as the best answer