Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search Organization by custom fields #87

Open
Maruga opened this issue Jun 30, 2021 · 2 comments
Open

Search Organization by custom fields #87

Maruga opened this issue Jun 30, 2021 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@Maruga
Copy link

Maruga commented Jun 30, 2021

hi, I want to search for an organization through a custom field, but it finds me all the organizations that contain 70, I tried to enter ExactMatch both true and false but it doesn't work. Any suggestions?
thank you very much

        Dim filtriRicerca As New OrganizationSearchFilters()
        filtriRicerca.Parameters.Add("custom_fields", "COD. CLIENTE")
        Dim Organizations = Await Pipedrive.Organization.Search("70", filtriRicerca)
@DavidRouyer
Copy link
Owner

Hi, you can't search by a specific custom field: https://developers.pipedrive.com/docs/api/v1/Deals#searchDeals. However, I'll add the news fields parameter which allows to specify the fields to perform the search from.

@DavidRouyer DavidRouyer self-assigned this Jul 5, 2021
@DavidRouyer DavidRouyer added the question Further information is requested label Jul 5, 2021
@dombarnes
Copy link

IIRC you can't add parameters in that way. They are generated when you set other fields. If you breakpoint your code before calling the search, you'll see that your parameters didn't add.

Try this. You may need to do your own filtering once you get search results, depending on what you're searching.

var searchQuery = new DealSearchFilters();
searchQuery.OrganizationId = crmOrg.Id;
searchQuery.Fields = DealSearchField.custom_fields;
var searchResults = await _pipedriveClient.Deal.Search("your custom field value", searchQuery);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants