Page 1 of 1

Cannot sort Note by id - 02281006

Posted: Sat Jul 02, 2016 6:37 pm
by max_max_mir
When I try to sort Note by id in /search, I get the following error message
"Bad sort: unknown field id." However, Note does have an id field (as does every other entity)
Sorting by id works for other entities. Is this a bug?

Code: Select all*&start=0&meta=off&BhRestToken=xxxxxx

Re: Cannot sort Note by id

Posted: Tue Jul 05, 2016 10:25 am
by s.hayes
The sort reference field should be noteID for this to work. I did a call like below and could returned sorted results. ... eted:false AND dateAdded:[1361635821000 TO *]&fields=id&count=500&start=0&useV2=true&BhRestToken=c7e02e87-5cb8-4b84-b16d-39b4663252ef&sort=noteID

You might get another error within your call saying bad structure when you correct the sort string. If so you just need to add a query parameter here with some info like I added above. You can modify as you like since this is an example but the correct field reference for note is noteID.

Re: Cannot sort Note by id - 02281006

Posted: Wed Jul 06, 2016 4:43 pm
by max_max_mir
Thanks Sean - why is it different for just the Note entity, when id works for all other entities?

Re: Cannot sort Note by id - 02281006

Posted: Wed Jul 06, 2016 6:46 pm
by s.hayes
Hey Max,
If something specific comes up on it I will report it here but there is no specific reason that I know of other than it just being structured this way for the Note Entity. It is probably because the Note entity is a little more complex then the other main entities that have their own lists such as Candidate, Client Contact, Client Corporation, Placement, etc. Therefore it requires a longer extension via the API to actually find the ID field associated with the Note Entity. If I find more information related to this then I will post it but to my knowledge it has always been searchable that way using the noteID parameter.