Data Access - Delete records

Data Access - Delete records

This guide you with the following:
  1. Overview
  2. Syntax
  3. Things to keep in mind
  4. Examples

Overview

The delete record deluge task deletes a form's records which meet a given criteria.
The criteria is mandatory.

Syntax

  1. delete from <form_link_name>[<criteria>];

Things to keep in mind

  1. Deleting a child form's record added as a subform entry from a parent form, will empty that subform entry in the parent form as well, even if the subform field is marked as mandatory.
  2. Deleting a parent form record only delinks the subform fields connected to the parent form record. In order to delete all the linked subform records when a parent form record is deleted, use Delete records task on Delete on validation workflow of the parent form. (Refer Example 4)
  3. Deleting a record in a lookup form will empty the corresponding lookup field's value in the related form, even if the lookup field is marked as mandatory.
  4. If you wish to delete all records in the specified form, use the following script as criteria:
  1. [ID != 0]
  1. It is advisable to fetch all records only when absolutely needed. Fetching all records generates a load resulting in performance issues.
This task can be used in the following events

Examples

The following script deletes all records with "Status" field value as "Resigned".
  1. delete from Employees[Status == "Resigned"];
The following script deletes all records of members who are above 65 years of age. 
  1. delete from Employee[DOB <= zoho.currentDate.subYear(65)];
  2.  //subYear is a which subtracts given number of years, which in this case is 65.
  3.  //zoho.currentDate is a which holds current(today) date value.
The following script deletes all records which have null value for "Name" field.
  1. delete from Employee[Name == null];  
The following script deletes all suform records linked to the current parent form record.
Note: Write this script in On Delete On Validate workflow event of parent form to delete all the linked subform records whenever a parent form record is deleted.
  1.  subforms_ids = parentForm_linkname[ID == input.ID].subForm_fieldname; 
  2.  for each sub in subforms_ids 
  3.  { 
  4.  delete from subForm_linkname[ID == sub]; 
  5.  } 

    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








                                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

                                      Zoho Desk Resources

                                      • Desk Community Learning Series


                                      • Digest


                                      • Functions


                                      • Meetups


                                      • Kbase


                                      • Resources


                                      • Glossary


                                      • Desk Marketplace


                                      • MVP Corner


                                      • Word of the Day


                                        Zoho Marketing Automation

                                          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 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







                                                                                            You are currently viewing the help articles of Sprints 1.0. If you are a user of 2.0, please refer here.

                                                                                            You are currently viewing the help articles of Sprints 2.0. If you are a user of 1.0, please refer here.



                                                                                                  • Related Articles

                                                                                                  • Data Access - Update records

                                                                                                    This guide will help you with the following: Overview Syntax Applicable data-type and expression for each field Things to keep in mind Example Overview The update records deluge task updates(replaces) the value of a specified field with the given ...
                                                                                                  • Data Access - Fetch Records

                                                                                                    This guide will help you with the following: Overview Return Syntax Things to keep in mind Examples Overview The fetch record deluge task retrieves records from a specified form, when a given criteria is met. The criteria is mandatory. Note: The ...
                                                                                                  • Delete Records

                                                                                                    This guide will help you with the following:       1. Syntax       2. Example       3. Response Format You can delete a record in an extension or vertical solution using the zoho.crm.invokeConnector() deluge task. Syntax <Response> = ...
                                                                                                  • Data Access - Add Records

                                                                                                    This guide will help you with the following: Overview Return Syntax Things to keep in mind Applicable data-type and expression for each field Example Overview The add record deluge task creates a new record with given values in the specified form. ...
                                                                                                  • Data Access - Criteria to fetch records

                                                                                                    This guide will help you with the following: 1. Overview 2. Syntax 3. Applicable operators for different datatypes Overview A criteria is required when you need to fetch a collection of records. Criteria comprises of one or more conditions separated ...
                                                                                                    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