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?
Access your files securely from anywhere
Zoho Developer Community
Deliver unforgettable customer experiences
Deliver unforgettable customer experiences
New to Zoho Marketing Plus?
Everything you need to run your marketing
New to Zoho Marketing Plus?
Everything you need to run your marketing
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Zoho TeamInbox Resources
Zoho DataPrep Resources
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Qntrl Resources
Zoho Creator Resources
Zoho Campaigns Resources
Zoho CRM Resources
Zoho Show Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.