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.

enter image description here

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.

  • Can you include the SOQL query you're currently using? – Nick Cook Aug 3 '17 at 2:21
  • @NickCook it happened because of we have been using version 38 in apex class. It seems field is available for Apex query after version 39. – Pasan Eeriyagama Aug 3 '17 at 3:16

As far as I can tell, you need to be using API v.39 or higher to access this field. This seems to be part of a new feature, as it doesn't appear in most of the documentation yet. It is mentioned here, but that's about it.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.