APIs & Integrations

Marcoooooooooo
Member

SDK doSearch - Sort does not work

Hi there,

Currently I use the 

"@hubspot/api-client": "^7.0.1"
module in nodejs and try to get the sort working for my custom objects.

I just try to get the max "vergutun_exklusive" like this:

 

client.crm.objects.searchApi.doSearch(model, {
      after: 0,
      limit: 1,
      filterGroups: [],
      properties: ["vergutung_exklusiv"],
      sorts: ["vergutung_exklusiv"],
    });

 

But I always get not the biggest.. The SDK itself just let me pass an array of string in the sort parameter

Marcoooooooooo_0-1657121748307.png

But your website itself passes an object for sorts.. so i tried to Stringify an object like urs.. but without any success

Marcoooooooooo_1-1657121850324.png

What do I wrong?

Kind Regards,
Marco

0 Upvotes
1 Reply 1
Marcoooooooooo
Member

SDK doSearch - Sort does not work

Found an Github Issue with the same problem I guess..
Just another endpoint
https://github.com/HubSpot/hubspot-api-nodejs/issues/9

0 Upvotes