CodeX Scripts - Intro | Help | Zoho Projects

CodeX Scripts - Intro

CodeX Scripts let you define custom logic that runs automatically when users interact with tasks or projects. It allows users to control how the module behaves based on certain conditions. Users can write scripts using JavaScript SDKs to trigger actions before or after a record is created or updated. Users with CodeX Scripts permission can configure and manage CodeX Scripts.
InfoCodeX Scripts are currently available as a limited release. To enable this feature for your portal, please contact support@zohoprojects.com
What Can You Achieve Using CodeX Scripts?

  1. Validate conditions and prompt custom restriction messages within the project and task module.
  2. Connect with external apps using HTTP requests.
  3. Automatically update tasks or project details based on conditions.
  4. Retrieve and update other project records in your portal.
For example, in a project, if you want to restrict your project members from creating subtasks for a closed task or an active task, you can use the CodeX Scripts to write in the code using the objects and the methods, to execute on a trigger such as "Before Create" and save.

Script:


This will prompt your project members with an alert that the subtasks cannot be created for this task when the user tries to create a subtask.

Execution:

 
Code used in this case:
  1. function main() { 
  2.      let task = current.record; 
  3.    
  4.      /** 
  5.       *  
  6.       * @type Number 
  7.       */ 
  8.      let startDate = task.start_date; 
  9.      Logger.info('Parent ID: ' + task.parent_task); 
  10.      Logger.info('Root Task ID: ' + task.root_task); 
  11.    
  12.      // console.log(JSON.stringify(variables.blockSubTasks)); 
  13.      if(task.parent_task || task.root_task) { 
  14.          Logger.info("Subtask creation is disabled"); 
  15.          throw new ScriptError("You cannot create a subtask");      
  16.      }   
  17.      //Similar case >>> Subtasks shouldn't be created under the closed parent task. 
  18.  } 

Find CodeX scripts to customize how task and project module should operate.

      Create. Review. Publish.

      Write, edit, collaborate on, and publish documents to different content management platforms.

      Get Started Now


        Access your files securely from anywhere

          Zoho CRM Training Programs

          Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

          Zoho CRM Training
            Redefine the way you work
            with Zoho Workplace

              Zoho DataPrep Personalized Demo

              If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

              Zoho CRM Training

                Create, share, and deliver

                beautiful slides from anywhere.

                Get Started Now


                  Zoho Sign now offers specialized one-on-one training for both administrators and developers.

                  BOOK A SESSION







                              Quick LinksWorkflow AutomationData Collection
                              Web FormsEnterpriseOnline Data Collection Tool
                              Embeddable FormsBankingBegin Data Collection
                              Interactive FormsWorkplaceData Collection App
                              CRM FormsCustomer ServiceAccessible Forms
                              Digital FormsMarketingForms for Small Business
                              HTML FormsEducationForms for Enterprise
                              Contact FormsE-commerceForms for any business
                              Lead Generation FormsHealthcareForms for Startups
                              Wordpress FormsCustomer onboardingForms for Small Business
                              No Code FormsConstructionRSVP tool for holidays
                              Free FormsTravelFeatures for Order Forms
                              Prefill FormsNon-Profit

                              Intake FormsLegal
                              Mobile App
                              Form DesignerHR
                              Mobile Forms
                              Card FormsFoodOffline Forms
                              Assign FormsPhotographyMobile Forms Features
                              Translate FormsReal EstateKiosk in Mobile Forms
                              Electronic Forms
                              Drag & drop form builder

                              Notification Emails for FormsAlternativesSecurity & Compliance
                              Holiday FormsGoogle Forms alternative GDPR
                              Form to PDFJotform alternativeHIPAA Forms
                              Email FormsFormstack alternativeEncrypted Forms

                              Wufoo alternativeSecure Forms

                              TypeformWCAG


                                          Create. Review. Publish.

                                          Write, edit, collaborate on, and publish documents to different content management platforms.

                                          Get Started Now




                                                            You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                                Manage your brands on social media


                                                                  • Desk Community Learning Series


                                                                  • Digest


                                                                  • Functions


                                                                  • Meetups


                                                                  • Kbase


                                                                  • Resources


                                                                  • Glossary


                                                                  • Desk Marketplace


                                                                  • MVP Corner


                                                                  • Word of the Day


                                                                  • Ask the Experts


                                                                    Zoho Sheet Resources

                                                                     

                                                                        Zoho Forms Resources


                                                                          Secure your business
                                                                          communication with Zoho Mail


                                                                          Mail on the move with
                                                                          Zoho Mail mobile application

                                                                            Stay on top of your schedule
                                                                            at all times


                                                                            Carry your calendar with you
                                                                            Anytime, anywhere




                                                                                  Zoho Sign Resources

                                                                                    Sign, Paperless!

                                                                                    Sign and send business documents on the go!

                                                                                    Get Started Now




                                                                                            Zoho TeamInbox Resources





                                                                                                      Zoho DataPrep Demo

                                                                                                      Get a personalized demo or POC

                                                                                                      REGISTER NOW


                                                                                                        Design. Discuss. Deliver.

                                                                                                        Create visually engaging stories with Zoho Show.

                                                                                                        Get Started Now








                                                                                                                            • Related Articles

                                                                                                                            • Working with CodeX Scripts

                                                                                                                              CodeX Scripts allows users to define custom logic that runs automatically based on events in the modules such as when a project or task is created, updated, or deleted. These scripts help enforce validations, restrict actions, or apply conditions ...
                                                                                                                            • CodeX Scripts for Projects

                                                                                                                              CodeX Scripts in Zoho Projects are advanced conditional logic scripts that help enforce specific rules and validations. Users can control how and when a project can be created, edited, or transitioned. This ensures better compliance and process ...
                                                                                                                            • CodeX Scripts for Tasks

                                                                                                                              CodeX Scripts in Zoho Projects are advanced conditional logic scripts that help enforce specific rules and validations. Users can control how and when tasks can be created, edited, or transitioned. This ensures better compliance and process ...
                                                                                                                            • JavaScript SDK for CodeX Scripts

                                                                                                                              Codex Scripts in Zoho Projects allow users to customize how the projects and tasks operate. Using these scripts, users can automate validations and actions, integrate external systems, and retrieve or update the data. CodeX Scripts are currently ...
                                                                                                                            • CodeX Credits

                                                                                                                              CodeX credits allows admins to monitor and analyze the number of CodeX script executions in Zoho Projects. Each time a script is executed, it uses one credit. Credits are allocated based on the organizations' subscription plan and will reset every ...
                                                                                                                              Wherever you are is as good as
                                                                                                                              your workplace

                                                                                                                                Resources

                                                                                                                                Videos

                                                                                                                                Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                                eBooks

                                                                                                                                Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                                Webinars

                                                                                                                                Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                                CRM Tips

                                                                                                                                Make the most of Zoho CRM with these useful tips.



                                                                                                                                  Zoho Show Resources