Zoho CRM Client Script - SetCriteria in lookup Field

Zoho CRM Client Script - SetCriteria in lookup Field

Hello All

One More Zoho CRM Client Script Tips & Trick.

Now you can Set the Criteria on Your lookup in zoho CRM, It Comes With a Create Page, Edit Page, and Details Page (Standard).

Example:-  We have a Room Module that includes Room Name, Status, Campus, and Sharing Option. Based on these details, students will allocate the room according to the specified criteria.

In the above Snapshot we have to assign the room those status is empty, The Sharing Option will be Double the campus in Goa.
Only lookups that match the given condition will have those values.

Sample Code:-
  1. //...........Criteria..........
  2. var object2 = ZDK.Page.getField('Sharing_Option').getValue();
  3. var object3 = ZDK.Page.getField('Campus').getValue();
  4. var object1 = ZDK.Page.getField('Room');
  5. object1.setCriteria("(Room_Status:equals:Empty)and
  6. (Campus:equals:"+object3+")and(Shearing_Option:equals:"+object2+")", 
  7. { filterOnSearch: true });
Hope this Document will help you.

Thanks & Regards
Piyush Goyal
Zoho Developer || Zoho CRM and Creator Certified
+91-8619164837 

    • Sticky Posts

    • Kaizen #226: Using ZRC in Client Script

      Hello everyone! Welcome to another week of Kaizen. In today's post, lets see what is ZRC (Zoho Request Client) and how we can use ZRC methods in Client Script to get inputs from a Salesperson and update the Lead status with a single button click. In this
    • Kaizen #222 - Client Script Support for Notes Related List

      Hello everyone! Welcome to another week of Kaizen. The final Kaizen post of the year 2025 is here! With the new Client Script support for the Notes Related List, you can validate, enrich, and manage notes across modules. In this post, we’ll explore how
    • Kaizen #217 - Actions APIs : Tasks

      Welcome to another week of Kaizen! In last week's post we discussed Email Notifications APIs which act as the link between your Workflow automations and you. We have discussed how Zylker Cloud Services uses Email Notifications API in their custom dashboard.
    • Kaizen #216 - Actions APIs : Email Notifications

      Welcome to another week of Kaizen! For the last three weeks, we have been discussing Zylker's workflows. We successfully updated a dormant workflow, built a new one from the ground up and more. But our work is not finished—these automated processes are
    • Kaizen #152 - Client Script Support for the new Canvas Record Forms

      Hello everyone! Have you ever wanted to trigger actions on click of a canvas button, icon, or text mandatory forms in Create/Edit and Clone Pages? Have you ever wanted to control how elements behave on the new Canvas Record Forms? This can be achieved