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? 

    Access your files securely from anywhere



                  Zoho Developer Community




                                          • Desk Community Learning Series


                                          • Digest


                                          • Functions


                                          • Meetups


                                          • Kbase


                                          • Resources


                                          • Glossary


                                          • Desk Marketplace


                                          • MVP Corner


                                          • Word of the Day


                                          • Ask the Experts





                                                    Manage your brands on social media



                                                          Zoho TeamInbox Resources



                                                              Zoho CRM Plus Resources

                                                                Zoho Books Resources


                                                                  Zoho Subscriptions Resources

                                                                    Zoho Projects Resources


                                                                      Zoho Sprints Resources


                                                                        Qntrl Resources


                                                                          Zoho Creator Resources



                                                                              Zoho CRM Resources

                                                                              • CRM Community Learning Series

                                                                                CRM Community Learning Series


                                                                              • Kaizen

                                                                                Kaizen

                                                                              • Functions

                                                                                Functions

                                                                              • Meetups

                                                                                Meetups

                                                                              • Kbase

                                                                                Kbase

                                                                              • Resources

                                                                                Resources

                                                                              • Digest

                                                                                Digest

                                                                              • CRM Marketplace

                                                                                CRM Marketplace

                                                                              • MVP Corner

                                                                                MVP Corner





                                                                                  Design. Discuss. Deliver.

                                                                                  Create visually engaging stories with Zoho Show.

                                                                                  Get Started Now


                                                                                    Zoho Show Resources


                                                                                      Zoho Writer Writer

                                                                                      Get Started. Write Away!

                                                                                      Writer is a powerful online word processor, designed for collaborative work.

                                                                                        Zoho CRM コンテンツ








                                                                                          Nederlandse Hulpbronnen


                                                                                              ご検討中の方




                                                                                                    • Recent Topics

                                                                                                    • Dynamic Date Filtering for KPI Widgets – Need Help with Query Table

                                                                                                      Hello, I'm seeking help with setting up dynamic date filtering for my KPI widgets in Zoho Analytics. Below is an overview of my setup and the issues I'm facing: Why: I need my KPI widgets to update dynamically based on a date range selected via a dashboard
                                                                                                    • ZOHO DESK ヘルプセンターの言語選択メニューの表示方法

                                                                                                      ZOHO DESK のヘルプセンターを構築し、多言語化設定をしました。 顧客のヘルプセンター画面右上に言語選択メニューが表示されないため、弊社の契約先会社に問い合わせましたが、「通常は多言語化をオンにすると表示するためCSS を触り過ぎではないか」 という指摘のみでした。 試行中ですが表示できません。 何か要因となる情報をお持ちの方がいましたらご教授いただけますと幸いです。 ↓の赤枠を表示したいのですが、表示できません。
                                                                                                    • Zoho Sign up forms on Wordpress website not working smoothly

                                                                                                      We have set up the forms on the website and linked them to respective email journeys. But when wesubmit the form the email generated/sent to user is not consistent. Sometimes the journey email is sent, sometimes a email verification message is sent ,
                                                                                                    • Windows Security Alert

                                                                                                      Hi, I'm using Zoho Assist with feature remote support session. I'm inviting a end user to a remote support session. When a user connects to a Zoho Assist remote support session we’re seeing Windows Security Alert pop up requesting changes to the firewall.
                                                                                                    • Facing issue when sent mail using zeptomail SMTP - Hard bounces || webscreenscraping.com

                                                                                                      Hi Support, User ID: 706899850 We are facing an error when send and email using Zeptomail SMTP especially from sales@webscreenscraping.com to sales@xbyte.io Reason: policy-related Message: 5.2.3 MailPolicy violation Error delivering to mailboxes Remote-MTA:
                                                                                                    • field is not saving on lead

                                                                                                      Hi, Not sure what i changed but on edit in a lead, i am inputting details and its not saving. just highlights it in yellow with no error message.
                                                                                                    • Creating Layout Rule With Formula Field

                                                                                                      By The Grace Of G-D. Hi, I see that i cannot use Layout Rules to show/hide Formula Fields. Is that something you plan on adding sometime soon?
                                                                                                    • Activity or History Log User Login

                                                                                                      Hi Everyone, I have Zoho Customer Portal, which has pages and reports. Is it possible to create 1 field such as true/false to find out users who have opened the customer portal? Like a kind of user activity log. Thank you so much.
                                                                                                    • Google Maps API integration into Forms

                                                                                                      I looked around a good bit and could  not find anything on this topic. I was curious about using the Google Maps API on a Zoho Form. Specifically an order form for a product that we will only deliver within certain City Limits. We currently use the API to call the exact address (as dictated by Google) and if the City name does not match where we service it is very evident. (Using FormCraft Form in Word Press) The "exact address" name is also used later in the process as well.  I do not see a way
                                                                                                    • TeamInbox Rules Not Working

                                                                                                      I have set up very basic rules, both at a team and personal level, but nothing works. E.G. Trigger: Inbound Message From: [sender email address] Has Attachments Apply Tag: [tag selected] The above ruleset is very broad and should automatically tag all
                                                                                                    • New Customization options in the module builder: Quick Create and Detail view

                                                                                                      Hello everyone, We have introduced two new components to the module builder: Quick create and Detail view. The Quick Create Component It is a mini form used to create a record and associate it to the parent record from a lookup field. For example, if you have a Deals lookup in the Contacts module, then you can associate existing deals or create a deal and associate it with the contact. You can customize this Quick Create form by adding standard as well as custom fields. There is no limit to the number
                                                                                                    • Set Approval for particular Reporting managers in zoho creator

                                                                                                      i am creating a leave management system in zoho creator.I want to create a approval workflow.There are various employees each employee has different reporting manager when employee apply for a leave then the leave should be able to approved by the manager
                                                                                                    • Function to check frequency of customer ordering patterns

                                                                                                      Hi, I'm no coder, so I thought I could make use of Chat GPT to generate some Deluge script to create a function that would check order frequency of our customers so that I could send an email if they go beyond their usual order pattern. Chat GPT and Claude
                                                                                                    • Possibly a stupid question: When I sync from Zoho CRM to Campaign, should I see those contacts in the Contacts list on Campaign?

                                                                                                      I have just initiated and completed a sync of my existing Zoho CRM contacts over to Zoho Campaign. It seems to have completed and synced around 500 contacts. However, those contacts do not appear in the All Contacts list (or any other list that I can
                                                                                                    • Pin multiple columns and adjust column widths in CRM subforms

                                                                                                      Hello all, Subforms act as secondary forms or tables in which you can associate multiple line items to a primary record and thereby ensure more structured and comprehensive data organization. We've made some recent enhancements to subforms. Here's what's
                                                                                                    • IN BIGIN MOBILE APP ZOHO INVOICE IS NOT VISIBLE

                                                                                                      I HAVE INTEGRATED ZOHO BIGIN WITH ZOHO INVOICE IN WEB IT IS WORKING VERY FINE WITH ZOHO INVOICE VISIBLE , HOWEVER IN MOBILE APP ZOHO INVOICE IS NOT VISIBLE IN THE TABS , IT IS VERY DIFFICULT TO CHECK THE PIPELINE WITHOUT THE INVOICE , I HAVE TO DOWNLOAD
                                                                                                    • Conexão de Meta Ads - A busca pelo Cálculo do ROI

                                                                                                      A empresa onde trabalho está em busca de calcular melhor o retorno sobre o investimento de das suas campanhas do Meta Ads. A zoho junto com a Google fez um excelente trabalho e disponibilizou o cálculo desse retorno de forma maestral com o dashboard abaixo.
                                                                                                    • Automatic bundling with sales orders

                                                                                                      What I do is I make products to order. Some of my products share same part. So sometimes one product sells better then the other one. When I create a bundle now I might sell out one product but then I cannot make it anymore because I already use the part
                                                                                                    • Flow based on New Deal - layout field problems

                                                                                                      Hi. I've built a Flow to create a Deal-specific folder within WorkDrive. It works except for referencing the Deal's layout. In my Zoho CRM, there are two types of Deals (separated by layout). For my Flow: Trigger on New Deal Then, I call 'Fetch module
                                                                                                    • How to associate a document sent in Zoho Sign with an deal in the CRM?

                                                                                                      Hi, often documents are loaded in Zoho sign and sent for signature. These sometimes are linked to a deal in the Zoho CRM and would be nice to see the status of the document within the CRM. I am aware of the integration, but that assumes that the document
                                                                                                    • How to install Widget in inventory module

                                                                                                      Hi, I am trying to install a app into Sales Order Module related list, however there is no button allow me to do that. May I ask how to install widget to inventory module related list?
                                                                                                    • Zoho Sheet view has two way sync or one way? Sheet view to CRM and what about CRM to Sheet view?

                                                                                                      I created a zoho sheet view. I can make changes and these changes are saved back to CRM. I have copied the link of this zoho sheet view for future easy access. Now I go to CRM, and update a single record in CRM. Now if I use the zoho sheet view link that
                                                                                                    • Enable Filtering by Notes in Accounts & Other Modules

                                                                                                      I noticed that we have the option to filter by notes in the Contacts module, which is great. However, in our company, we add notes specific to an Account, and currently, there's no option to filter Accounts with notes. Can this be enabled? It would also
                                                                                                    • Whats App Automation

                                                                                                      It would be nice to be able to send out an automated whats app message template on moving stages or creation of a ticket (same as you can do for automated emails). Currently only automated emails can be sent. Also, if whats app could be used more effectively
                                                                                                    • A fresh interface and functionality improvements for Zoho CRM's data sharing settings

                                                                                                      Data sharing is essential for maintaining proper access controls in your CRM. Whether you're setting default permissions or defining custom sharing rules, these settings determine how records are shared among users, roles, and groups. Previously, navigating
                                                                                                    • Capture GPS location field

                                                                                                      When using a mobile phone to complete the form, I need to capture the GPS location. When this field going to be available? Same question for taking pictures with mobile phone and capturing that picture automatically. Thanks
                                                                                                    • I can't auto-scheduling calls down - the code does not change anything

                                                                                                      Hi, I was trying to set a function that auto-schedules calls based on their call result; i.e "Requested more info". I had also included a reminder to send an email in the code. I logged a test call and nothing changed. Is there anything wrong with the
                                                                                                    • How can I ensure that emails sent and received in my Policy module also appear in the associated Account module under "Emails" ?

                                                                                                      I'm working with ZOHO CRM and I have separate Policy and Account modules. Currently, when I send or receive emails related to a policy, they are stored within the Policy module. However, I want these emails to also appear in the corresponding Account
                                                                                                    • How can I create a deal with multiple payment milestones in Zoho CRM?

                                                                                                      Hi. We are a services based company and most of our deals involve monthly invoicing for T&M work or payment milestones for fixed price projects. How can I create a Deal in CRM that shows monthly (or multiple) payment milestones, rather than just the total
                                                                                                    • CRM

                                                                                                      I have a portal set up where a contact can see other contacts within an account automatically. When a contact in the portal enters a deal, how do I make sure that deal is assigned to the account so other contacts in the account can see the deal was generated?
                                                                                                    • How do I add new line and format text in zoho desk ticket?

                                                                                                      I am generating a ticket via API and looking to update "description" field of ticket whenever I need. Is there a document where I can find supported formatting for description field on a ticket.  I need to find: Adding a new line and adding bold text,
                                                                                                    • 3/26(水)開催|5名限定 課題解決型ワークショップイベント Zoho ワークアウト開催のお知らせ

                                                                                                      ユーザーの皆さま、こんにちは。Zoho ユーザーコミュニティチームの中野です。 3月開催のZoho ワークアウトについてお知らせします。 ▶︎▶︎参加登録はこちら:https://us02web.zoom.us/meeting/register/hIEhQFdRQwKpalC9A4hBEQ ━━━━━━━━━━━━━━━━━━━━━━━━ Zoho ワークアウトとは? Zoho ユーザー同士で交流しながら、サービスに関する疑問や不明点の解消を目的としたイベントです。 Zoho サービスで完了させたい設定やカスタマイズ、環境の整備など……各自で決めた目標達成に向け、
                                                                                                    • teaminbox with zoho mail

                                                                                                      i pay for zoho one, and use zoho mail for my business email. if i use zoho teaminbox ,can i add my zoho mail account to team inbox? will it sync my folders via imap (sent, deleted etc?)
                                                                                                    • Introducing Linkthread by Zoho Social — our new link in bio tool

                                                                                                      Hey everyone, We hope you're all doing amazing. We always love bringing features and tools to make your social media marketing journey easier, and today, we've got a brand new tool that we'd like to introduce to you. We know how important it is to make
                                                                                                    • WhatsApp Sandbox Integration

                                                                                                      Dear Zoho Team, I am currently having two questions regarding the WhatsApp integration of Zoho Desk, or more specifically the Sandbox WhatsApp integration. 1. I am unable to send replies via the API through the "Sandbox" channel. Here is some example
                                                                                                    • Disable Default Value in Multi-Select field

                                                                                                      Hello, Is there a way to disable the default value feature when setting up a custom Multi-Select field? When creating tickets I would like it so there isn't a value pre-selected in the multi-select custom field that was created.
                                                                                                    • Python - code studio

                                                                                                      Hi, I see the code studio is "coming soon". We have some files that will require some more complex transformation, is this feature far off? It appears to have been released in Zoho Analytics already
                                                                                                    • Help with Tickets Endpoint

                                                                                                      Hello Team, I am using the ticket lookup endpoint to retrieve the list of tickets associated with a particular account. GET https://desk.zoho.eu/api/v1/accounts/{accountID}/tickets I want to know if there is a way to filter the tickets to retrieve only
                                                                                                    • How can I view Help Center articles in 'Sandbox' mode?

                                                                                                      I have published some help center articles but when I try to preview the knowledge base page, it says 'We have no content to display'.
                                                                                                    • Mass Update Doesn't Trigger Workflow

                                                                                                      Hello there, I made a workflow in Zoho Desk, and its related to Ticket module, when I update the field workflow triggers, but the problem is when I update the field in Tickets module List View (Mass Update) the workflow isn't triggering. If I can't trigger
                                                                                                    • Next Page