Unable to Access Metaobject Fields from Order Metafield in Packing Slip

I have an order metafield (order.metafields.custom.picker_allocated) that stores a reference to a metaobject of type picker_allocated. When I try to access its fields in a packing slip using Liquid:

`{% assign picker_ref = order.metafields.custom.picker_allocated %}
{% if picker_ref.value %}
  <br> picker_ref : {{picker_ref.value}}
  <br> picker_ref : {{picker_ref}}
{% else %}
  No metaobject found for {{picker_ref}}
{% endif %}`

I get:

No metaobject found for gid://shopify/Metaobject/124344205565

What I’ve checked:

  • The metaobject type is correct (picker_allocated).

  • The metafield does store a valid metaobject reference.

  • Using .value still doesn’t fetch the metaobject in the order context.

is there a way to access metaobject fields from order metafields in packing slip?

Hello @Abhijith_A_Kumar,

I did some tests according to your metafield/object architecture and I get the same result. Note that packing slip templates use a different variation of Liquid. And while there is no mention that metafields/objects are not accessible, differences may apply. See the docs for reference

From my tests, I observe the following:

{% liquid
  echo order.metafields.custom.picker_allocated
  # Outputs the metaobject GID

  echo order.metafields.custom.picker_allocated.value
  # Outputs nothing
%}

I did the test with a more straightforward architecture, a single line text order metafield and same behaviour. Packing slip templates seems not able to access the reference value

Maybe Shopify staff can come back to you with more visibility on this, but either way the docs could be enriched with this piece of important data :slight_smile:

Hope it helps !