# Unable to use ref as argument in fetch function

**URL:** <https://www.dolibarr.org/forum/t/unable-to-use-ref-as-argument-in-fetch-function/21387>\
**Category:** Developing for Dolibarr\
**Tags:** Code, Develop\
**Created:** [November 3, 2021, 12:57pm UTC](https://www.dolibarr.org/forum/t/unable-to-use-ref-as-argument-in-fetch-function/21387 "2021-11-03T12:57:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Price](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/t/ecae2f/32.png) [@Thomas\_Price](https://www.dolibarr.org/forum/u/Thomas_Price)\
**Post date:** [November 3, 2021, 12:57pm UTC](https://www.dolibarr.org/forum/t/unable-to-use-ref-as-argument-in-fetch-function/21387/1 "2021-11-03T12:57:35Z")

</div>

All the resources I have looked at using the command fetch with the row id value as the argument to the function. When I looked at the documentation for the product class I noticed that the ref value is included as an argument. Unfortunately when I try to use it in some custom code I am working on it causes an error. I did this with the product class, but I believe it may affect more than that class specifically.
