Search for fields with null values

Search for fields with null values

Hi all,

I'm writing a custom function in Desk. Part of this function must search for all tickets that are unassigned in a certain department. This is the part of the code:
  1. unassignedTicketSearchCriteria = Map();
  2. unassignedTicketSearchCriteria.put("assigneeId",null);
  3. unassignedTicketSearchCriteria.put("status","Open");
  4. unassignedTicketSearchCriteria.put("departmentId",departmentId);
  5. unassignedTicketResponse = zoho.desk.searchRecords(orgId,"tickets",unassignedTicketSearchCriteria,0,100,"new_desk");
This search is returning tickets where there is an agent assigned to and unassigned. This query is ignoring the search criteria "assigneeId". What I'm suspecting is that the code interpreter is ignoring the search criteria because it reads the query as being empty (null).
I tried sending it as a string "null", this gives a data type mismatch error. I tried converting the string to Long using toLong(), this gives me an error that the parameter can't be empty. Setting it as null (like in the code above) does nothing.

Has anyone been able to get this working?