Customizing form events in Zoho Projects with CodeX

Customizing form events in Zoho Projects with CodeX


Dear users,

Beyond Task Lists is a series of articles aimed at showcasing the various customization capabilities of Zoho Projects. We'll discuss real life project management scenarios, use cases, and requirements that needs combining multiple features. This article is about using CodeX to customize the tasks and projects module.

Zoho Projects offers comprehensive automation and customization for modern project management: workflows, blueprints, and business rules. But when you want to make that near impossible customization happen, CodeX is here to help.

With CodeX, you can use Javascript SDKs on the project or task records before or after creating, editing, or deleting them. (Note: CodeX scripting is available in the free plan and all paid plans. Execution is limited by CodeX credits.)

This includes special cases like:

Info
1. Applying restrictions to record updates
2. Restricting field edits unless conditions are met or until a status changes

Use case:

An Indian firm with multiple locations needs to file tasks by region. Each task layout has drop-downs for the state and city, but users often mismatch the selections, causing confusion. In this case, workflow automation doesn't solve the issue.

The solution flow:
  1. Click the Setup icon in the top right.

  2. Select Developer Space and click CodeX Scripts.

  3. Give a name for the script, choose the Task module, select a layout, and choose Before Create as the event.

  4. Paste the following script into the CodeX terminal and click Save.
    1. function main() {

      // define states and cities
      const states = [
      {
      state: "Tamil Nadu",
      cities: ["Madurai","Chennai","Trichy"]
      },
      {
      state: "Karnataka",
      cities: ["Tumkur", "Mysuru", "Bangaluru"]
      },
      {
      state: "Kerala",
      cities: ["Cochin", "Ernakulam", "Kottayam"]
      }
      ];

      // capture state selection
      let state = current.record.state;

      // capture city selection
      let city = current.record.city;

      // Find matching state
      const stateObj = states.find(s => s.state === state);

      // Validate city against district
      if (!stateObj.cities.includes(city)) {
      throw new ScriptError(` ${city} is not in $(state)`);
      }
      }
      




      This way, when a city not in the corresponding state is selected, the system throws a custom-defined error.

Idea
Pro-Tip: With CodeX, you can also:

1. Make HTTP requests to other apps.
2. Update tasks or project records based on conditions.
3. Retrieve record details and update other project records in your portal.

Take a look at our help docs for more details - CodeX in Projects.

Have questions you think might require CodeX? Reach out to us and we can help. Want us to write about an aspect of Zoho Projects in detail? Let us know and we can add it to our list.

Best,
Zoho Projects Team

    • Sticky Posts

    • Enhanced Collaboration and Global Web Tabs

      Hello Users, We are rolling out two key enhancements in Zoho Projects that will be part of our November release. Here’s what to expect: 1. Collaboration Section in the Left Navigation Panel What’s new? All communication and interactive tools will be grouped
    • Choosing the Right Automation in Zoho Projects

      In any project, different types of actions are needed at different points. Some projects require control on how tasks move, some require reacting to updates, and some require executing additional actions beyond the task. Automation in Zoho Projects is
    • Introducing Version-3 APIs - Explore New APIs & Enhancements

      New Update - The end of life timeline for V2 APIs has now been extended to 30th June, 2026 Happy to announce the release of Version 3 (V3) APIs with an easy to use interface, new APIs, and more examples to help you understand and access the APIs better.
    • CodeX Scripts for Enforcing Custom Project Logic

      Every organization has a defined way of executing projects. There are clear expectations around how tasks should move, when projects should progress, and which actions require validation. When these rules are consistently followed, projects remain structured
    • Automation Series: Auto-create Dependent Task on Status Change

      In Zoho Projects, you can automatically create and assign a dependent task when a task’s status is updated. This helps teams stay aligned, ensures reviews happen on time, and reduces manual effort. In this post, we’ll walk through an easy setup using
      • Recent Topics

      • Zoho Commerce Microstore to bypass customer portal on spesific items

        Hi everyone, I’m currently testing the Microstore feature in Zoho Commerce and trying to understand how it behaves with access restrictions. My goal is the following: Even though the customer portal is enabled (and the main store requires users to sign
      • Custom Fields - Conditional Visibility

        At one time, it was possible to set visibility rules for custom fields. It seems like that functionality has either been eliminated or placed somewhere not obvious to me. Has that feature been removed, or is it somewhere that is not obvious to me? The
      • Business Day Logic Update: More Accurate Scheduling for Your Workflows

        Hello everyone, We’re improving how business-day calculations work in workflows, especially when triggers happen on weekends. This update ensures that offsets like +0, +1, and +2 business days behave exactly as intended, giving you clearer and more predictable
      • Multiselect lookup in subform

        It would be SO SO useful if subforms could support a multiselect look up field! Is this in the works??
      • App passwords stop working

        Some of my app passwords appear to stop working after awhile. Seems to happen every 6 months or so. Just had to change one again for the second time in a year. Is this a bug or a feature? Or perhaps changes are being made on the back end on occasion that
      • How to publish different instances of the same application.

        I am using Creator for my internal management my store. I am opening a new location, and I want to have a somewhat separate instance of the same app for my new store to use, since the data will all be different, and there is no need to interact between
      • Zoho Analytics - Compensation Information?

        I am attempting to put together payroll reports in Zoho Analytics. However, I do not see any way to get compensation information from Zoho People to sync. Am I missing something? The use case seems like it should be obvious; it's difficult to do payroll
      • ZOHO Cadence

        Can you edit when a cadence is set to enroll? For instance, I currently have it set up to enroll three days after a new record is created that fits the custom view criteria; however, I would like to change it to enroll immediately. I do not see where
      • Compensation | Salary Packages - Hourly Wage Needed

        The US Bureau of Labor Statistics says 55.7% of all workers in the US are paid by the hour. I don't know how that compares to the rest of the world, but I would think that this alone would justify the need for having an hourly-based salary package option.
      • Canvas and calendar

        Is it possible to have a canvas view that shows say a contacts details with the meetings calendar on the same page?
      • Error when subscribing to any iCal feed in Group Calendar

        When I try to add any iCal URL via Settings → Calendar → Calendars → Group Calendars → Manage → Subscribed by Group, Zoho pops up an ‘Internal Server Error’ and nothing is added in the ‘Subscribed by Group’ list. But - the feed then appears under my personal
      • FSM- are we getting there

        We have now tried the FSM a couple of times. We have been defeated on the offline access. As you can imagine the enginner needs to know the customers details, the job and the equipment. This needs to be cache. Is it yet? Plus Our engineers do multiple
      • Zoho CRM Copilot Connector

        Hello, Are there plans to release a connector for Zoho CRM and Copilot? I'm in the early research stages of potentially switching our CRM solution to Microsoft Dynamics because of its out of the box integration with Copilot. The advantage being that we
      • Mail bounces due to bad reputation

        Good evening. I'm seeing these errors from both hotmail/outlook and yahoo, as well as hard bounce from Virgin Media and talktalk for some time now. Bounce category: Connection issues Reason: uncategorized-bounce Message: 4.7.650 The mail server [136.143.188.237]
      • The in between line spacing management

        In the Microsoft Word, when we write something there is a tool from where we can manage the line spacing. Here in writer app in mobile it is by default 1.5. I request Zoho Team to give the option from where I can control Line Spacing, Remove space between
      • Sort by Project Name?

        How the heck do you sort by project name in the task list views??? Seems like this should be a no-brainer?
      • Bulk upload images and specifications to products

        Hi, Many users have asked this over the years and I am also asking the same. Is there any way in which we can bulk upload product (variant) images and product specifications. The current way to upload/select image for every variant is too cumbersome.
      • Side bar menu

        It would be great if you could stop the auto collapse of expanded menus when selecting a different module. It would save a lot of mouse clicks for a lot of users that frequently switch between sales & purchases as we do, it's easier to collapse them manually when not required !
      • Re: Application Architecture in Zoho Creator — A Platform-Specific Deep Dive

        A recent community post on application architecture made some excellent points about planning architecture early in Zoho Creator projects. The core message is right — Creator applications have a habit of growing organically into maintenance nightmares,
      • What's New in Zoho Inventory | January - March 2026

        Hello users, The first quarter of 2026 has been dynamic! We’ve shipped a powerful set of updates in Zoho Inventory to enhance item control, improve warehouse efficiency, expand integration and reporting capabilities. From a unified item creation experience
      • Deliver timely updates across your organization

        Keeping your organization informed goes beyond sending emails or sharing links. It requires ensuring that the right information reaches users at the right time, without being missed. Whether it's communicating policy changes, maintenance schedules, webinar/training
      • Zoho Commerce -

        Zoho Commerce currently only allows merchants to define the United Kingdom as a single shipping zone, which creates a significant issue for businesses operating between the EU and the UK. Under the Northern Ireland Protocol, Northern Ireland follows EU
      • Connecting Portals from different Zoho apps

        Hi, I note that Zoho has functionality for customer portals for several of the Zoho apps, like CRM, Projects, Desk etc. Is there any way to connect these portals?  It would be great if we could give our customers access to a portal in which they could
      • Invalid value passed for line_item_category

        duplicating a previous used invoice and trying to save it (new invoice number / po number used) I keep encountering this error when trying to save the invoice Invalid value passed for line_item_category
      • Make Task ID and Issue ID columns filterable like all other columns

        Hello Zoho Projects Team, We hope you are doing well. We would like to submit a feature request regarding the Task ID and Issue ID columns in Zoho Projects list views. Current Limitation: As of now, in both the Tasks and Issues modules, almost every visible
      • Full Email Threading for Custom Modules

        My clients run their core business operations inside Custom Modules. They need to see their full email history directly within those records. Right now the integration is limited compared to the Deals module. Users have to jump back to the Contact record
      • Edit Active Workflows

        Workflows are great and extremely powerful, however the inability to edit active workflows makes iterating on their functionality extremely difficult. It would be great to have the ability to edit workflows even while active. When this is done, It would
      • Automation Series: Assign Subsequent Task Owner on Completion

        When a project progresses, tasks get piled up over time. As new tasks are created, tracking ownership and assigning them can become time consuming. In Zoho Projects, this can be addressed by automating task assignment using Custom Function, so that ownership
      • Multiple Pricing for single item

        We are doing billing based on batch number. We required multiple Price for an Single Item based on Batch. While billing the POS should fetch the price based on batch. Whether this could be done ?
      • Split Bills/Expsense between multiple projects and/or clients

        I need to be able to split vendor invoices/ expenses between multiple clients. Entering the bill multiple times is not only time consuming, it defeats the purpose of having a unquie identifity bill number and will allow for possible duplicated entry.  Below is an example from Quickbooks Desktop. Splitting costs over various projects is a common job costing function that I am very sad and surprised is not an option in Zoho Books. Unless I am missing it somewhere? Thanks for your help!
      • Disable - order online at zoho store

        I'm running cafe with Zoho POS. Doing good, however this enablement (Disable online order only on zakyastore.in) would enhance the business. Support asked to close -> "We can close the store from more options in the Mobile store > Overview > Store details
      • Worst product ever designed - Zoho Books.

        It is designed and conceptualised by people without any financial background. Basically bunch of software engineers who knows how to code. They dont have any idea how finance people will use this product, what are their requirements, how transactions
      • Configuring Email Notifications with Tautulli for Plex

        Hi I'm new to Zoho. I am from Canada and I have a I use a web based application called Tautulli for Plex that monitors my Plex media server. It also sends a newsletter to my followers. To set this up they require a "From" email address., a smtp server
      • Cliq iOS can't see shared screen

        Hello, I had this morning a video call with a colleague. She is using Cliq Desktop MacOS and wanted to share her screen with me. I'm on iPad. I noticed, while she shared her screen, I could only see her video, but not the shared screen... Does Cliq iOS is able to display shared screen, or is it somewhere else to be found ? Regards
      • Last activity time is acting like last modified time

        When i edit the description or any field in the potential, account, contact and lead, the Last Activity Time is being updated like the Modified Time. This is messing all workflows and reports and we are unable to track real last time of activities like
      • Total Saving in POS Screen

        Displaying the Total Saving in POS Screen, while adding the items before before recording the payment. Customer wish to know this total savings before making the payment (i.e., before recording the payment). Currently we can able to view this total saving
      • How to skip weekends and public holidays in a scheduled workflow using Deluge in Zoho Creator?

        Hi, I have a scheduled workflow in Zoho Creator that runs daily at a fixed time. I want it to execute only on working days skipping weekends and public holidays. Could anyone please help me with how to achieve this?
      • Can I hide empty Contact fields from view?

        Some contacts have a lot of empty fields, others are mostly filled. Is there a way I can hide/show empty fields without changing the actual Layout? I would like to de-clutter my view, and also be able to add information later as I am able. I would be
      • Building extensions #1: Creating, testing, and editing extensions for Zoho Sprints using Sigma Cloud Editor

        Hello all! We're delighted to announce the beginning of a new series called Building extensions for Zoho Sprints. Our primary goal for this series is to educate developers on the process of creating extensions for Zoho Sprints and guide them through the
      • How to use Picklist values language in email templates

        Hello, I'm using multi-language in Zoho CRM and I've prepared separate email templates for each language. My question: how do I make sure the picklist field values in each template are rendered in the language that matches the template itself? This is
      • Next Page