# API Query error entity.error/schema-field-not-found

**URL:** <https://community.fibery.io/t/api-query-error-entity-error-schema-field-not-found/9494>\
**Category:** Get Help\
**Created:** [August 28, 2025, 9:58pm UTC](https://community.fibery.io/t/api-query-error-entity-error-schema-field-not-found/9494 "2025-08-28T21:58:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![myg\_ge](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/myg_ge/32/12457_2.png) [@myg\_ge](https://community.fibery.io/u/myg_ge)\
**Post date:** [August 28, 2025, 9:58pm UTC](https://community.fibery.io/t/api-query-error-entity-error-schema-field-not-found/9494/1 "2025-08-28T21:58:10Z")

</div>

Here’s my space & database:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/1/1cafe867ddd67f1ba5bfc146102339edd431a19d.png)

What’s wrong with the following query?

```auto
[{ "command": "fibery.entity/query", 
  "args": { "query": {
  "q/from": "CRM/Person Email Activity",
  "q/select": ["fibery/id","fibery/public-id", "CRM/UUID"],
  "q/where": ["=", ["CRM/UUID"], "9b1f3c2e-6a44-4d3f-b1e7-2c9a5f0b8d6c"],
  "q/limit": 1
} } }]

```

I get this error:

```auto
name
entity.error/schema-field-not-found
message
"9b1f3c2e-6a44-4d3f-b1e7-2c9a5f0b8d6c" field was not found in "CRM/Person Email Activity" database.

```

If I remove the following line, query executes just fine:

```auto
  "q/where": ["=", ["CRM/UUID"], "9b1f3c2e-6a44-4d3f-b1e7-2c9a5f0b8d6c"],

```

Here’s the proof:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/f/f49fc8d3cc1897750a2b5af58f7ebc257ad5dc2d.png)

What am I doing wrong here?

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [August 29, 2025, 5:49am UTC](https://community.fibery.io/t/api-query-error-entity-error-schema-field-not-found/9494/2 "2025-08-29T05:49:19Z")

</div>

I think you need to make use of “params” rather than including the search query value as a string literal

See the guide:

> **[Entity API](https://the.fibery.io/@public/User_Guide/Guide/Entity-API-264/anchor=Filter-Entities--38afb672-fb3b-4c59-800d-8c34b4e528f9)**

---

<div class="post-metadata">

**Author:** ![myg\_ge](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/myg_ge/32/12457_2.png) [@myg\_ge](https://community.fibery.io/u/myg_ge)\
**Post date:** [August 29, 2025, 12:42pm UTC](https://community.fibery.io/t/api-query-error-entity-error-schema-field-not-found/9494/3 "2025-08-29T12:42:29Z")

</div>

You’re right. I’ve overlooked that.

```auto
[{ "command": "fibery.entity/query", 
  "args": { 
    "query": {
      "q/from": "CRM/Person Email Activity",
      "q/select": ["fibery/id","fibery/public-id", "CRM/UUID"],
      "q/where": ["=", ["CRM/UUID"], "$message_id"],
      "q/limit": 1
    },
    "params":{
      "$message_id": "9b1f3c2e-6a44-4d3f-b1e7-2c9a5f0b8d6c"
    }
  } 
}]

```

This one works just fine. Thanks again Chris!
