The ExtendedFieldsQueryBuilder
allows you to run, sort, and control
which results a query returns.
Typically, you build a query using the queryExtendedFields()
function,
refine the query by chaining ExtendedFieldsQueryBuilder
functions, and then execute the
query by chaining the find()
function.
For example, the following code returns the first 5 extended fields that were created by sorting them in ascending order:
import { contacts } from "wix-crm-backend";
contacts
.queryExtendedFields()
.ascending("_createdDate")
.limit(5)
.find()
.then((results) => {
return results.items;
});
Note:
Only visitors with
Manage Contacts permissions
can query extended fields.
You can override the permissions by setting the suppressAuth
option to true
in the find()
function.