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:
- unassignedTicketSearchCriteria = Map();
- unassignedTicketSearchCriteria.put("assigneeId",null);
- unassignedTicketSearchCriteria.put("status","Open");
- unassignedTicketSearchCriteria.put("departmentId",departmentId);
- 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?
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Zoho Orchestly Resources
Zoho Creator Resources
Zoho WorkDrive Resources
Zoho Campaigns Resources
Zoho CRM Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.