Cannot sort Note by id - 02281006

Forum for users and developers of Bullhorn's API service.

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
max_max_mir
User
Posts: 77
Joined: Tue Jun 22, 2010 4:25 pm

Cannot sort Note by id - 02281006

Post by max_max_mir » Sat Jul 02, 2016 6:37 pm

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

https://rest2.bullhornstaffing.com/rest-services/xxxxxx/search/Note?count=1&sort=id&fields=*&start=0&meta=off&BhRestToken=xxxxxx
- Y

s.hayes
User
Posts: 12
Joined: Wed Dec 31, 1969 8:00 pm

Re: Cannot sort Note by id

Post by s.hayes » Tue Jul 05, 2016 10:25 am

Hello,
The sort reference field should be noteID for this to work. I did a call like below and could returned sorted results.

https://rest3.bullhornstaffing.com/rest ... 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.
Sean Hayes | Enterprise Support Analyst

max_max_mir
User
Posts: 77
Joined: Tue Jun 22, 2010 4:25 pm

Re: Cannot sort Note by id - 02281006

Post by max_max_mir » Wed Jul 06, 2016 4:43 pm

Thanks Sean - why is it different for just the Note entity, when id works for all other entities?
- Y

s.hayes
User
Posts: 12
Joined: Wed Dec 31, 1969 8:00 pm

Re: Cannot sort Note by id - 02281006

Post by s.hayes » Wed Jul 06, 2016 6:46 pm

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.
Sean Hayes | Enterprise Support Analyst

Post Reply