How to Use itemSearch for Multiple Options Custom Fields?
I’m trying to use the itemSearch
to get all companies with a custom field of the "multiple options" type, but the request is returning no results.
How can I search for companies that have a specific option set in a custom field of the "multiple options" type?
For example, the custom field name is "category" and it has two options: “Client” and “Partner”. I’d like to search for all companies that are categorized as clients.
Here is the request I'm using:
{{baseUrl}}/itemSearch/field?term=client&field_type=organizationField&field_key=bbdb2eef7e65dcb531086fb3ba9c8cdddd514f14&return_item_ids=true
This version clarifies your intention and provides the necessary details in a more organized manner.
Best Answer
-
Hi @Edson de Paula Is your field single or multiple option type? If so that could be the reason, as
itemSearch
will search by values under text, large text, numerical, monetary, autocomplete, phone and address type custom fields.
Instead, you can try creating an organization filter that finds all companies with that specific option and then usingGET/v1/organizations
withfilter_id
being the id for the specific organization filter you want to apply.1
Answers
-
Thank you @Manuel Oliveira!
0