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';
.then( (results) => {
return results.items;
javascript | Copy Code

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.

Was this helpful?