I'm trying to select a case and the product ID from the Case table. The field exists according to the WSDL:

```
<complexType name="Case">
  <complexContent>
    <extension base="ens:sObject">
      <sequence>
        ...
        <element name="ProductId" nillable="true" minOccurs="0" type="tns:ID"/>

```

Yet the following fails:

```
Line:306 - SoQL code is: SELECT Id, Account.Name, ProductId FROM Case WHERE CaseNumber = '00008000'
INVALID_FIELD:
SELECT Id, Account.Name, ProductId FROM Case WHERE CaseNumber
                         ^
ERROR at Row:1:Column:26
No such column 'ProductId' 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. at /usr/local/share/perl5/WWW/Salesforce.pm line 719.

```

I have tried ProductId and Case.ProductId, both fail. I have also tried Product.Id, that fails as well.

---

Thanks @Jayant, I checked the FLS and it's readable by my ID.

@sfdcfox, thanks for the pointer. I have an element called "Product" which is of type "Product2" and is in the "Case" object:

```
<element name="Product" nillable="true" minOccurs="0" type="ens:Product2"/>

```

If I try and use that as a linked item I get:

```
Line:306 - SoQL code is: SELECT Id, Account.Name, Product.Name FROM Case WHERE CaseNumber = '00008000'
INVALID_FIELD: No such relation '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. at /usr/local/share/perl5/WWW/Salesforce.pm line 719.

```

Surely if it's in the "Case" object in the WSDL and if I have read access then it should be accessible?

* edit -- It's definitely not FLS. I just made Product visible and read-only to everybody but I still get No such column 'Product' on entity 'Case'

I have access to other fields in the Case object so it's not a problem with that object in general.

-- edit -- 

It's definitely not FLS. I just made Product visible and read-only to everybody but I still get No such column 'Product' on entity 'Case'.

I have access to other fields in the Case object so it's not a problem with that object in general.