Skip to main content
Pasan Eeriyagama preguntó en #Apex
I'm trying to read Unit of Measure on Product2. But getting compile time error as below.

 

No such column 'QuantityUnitOfMeasure' on entity 'Product2'. 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.

But in Product entity field seems there.

No such column 'QuantityUnitOfMeasure' on entity 'Product2'

Not sure if I am using a wrong field name. In docs I couldn't find this field though. Can someone help me with reading unit of measure in product using SOQL?

Appreciate any help. Thanks.

 
2 respuestas
  1. 3 ago 2017, 3:18 a.m.
    Found it. It happened because of we have been using version 38 in apex class. It seems field is available for Apex query after version 39. We changed the version to latest right now (i.e. 40) and it worked fine.