If I delete a record in a form (table) that has "child" records in another form, the child records are not deleted. How can I delete the child records?

If I delete a record in a form (table) that has "child" records in another form, the child records are not deleted. How can I delete the child records?

bout the application

The application Deleting child nodes illustrates how to delete child records when a record is deleted from the parent form.The applicationcomprises of two forms:

  1. Client form to enter the client name (master form).
  2. Client Details form to enter each client details (child form with lookup to the Client form).

Adding Deluge Script

When a record is deleted from the parent form (Client form), the on delete -> on validate script added to this form will delete all the child records corresponding to this client, from the Client Details form. To add the script in the Client form,

  1. Select the from the Forms tab and click on More Actions -> On Delete -> Validate
  2. Use the Delete Records task to delete records from the Client_Details form with the specified criteria.
on  delete
{
on validate
{
delete from Client_Details[ Client_Name == input.Name ];
}
}

The above script will delete the records from the Client Details form and then delete its parent record from the Client form.

Note: Deleting of child records from the on delete -> on success script is not supported

To install the application,

  1. Download the script file (.ds file)
  2. Install the application to your account. Click here to learn how to install using the script file (.ds file)

    • Related Articles

    • Common Operations with records

      Record Navigation Navigation primarily means the process of moving back and forth within the records. In Zoho CRM, navigation allows easy movement between the records; it provides options to choose the number of records to be displayed in one page ...
    • Common Operations with records

      Record Navigation Navigation primarily means the process of moving back and forth within the records. In Zoho CRM, navigation allows easy movement between the records; it provides options to choose the number of records to be displayed in one page ...
    • How to find and remove duplicate records in my Form

      It is possible to find the duplicate entries in the database and delete them. Below is the example of removing duplicate email entries in your database. You can replace the Email field with the field name that you want to find for duplicate entries. ...
    • Record Sharing

      Collaboration is essential in a team. Zoho Workerly provides different levels of data sharing, one being the record-level sharing where users can share Jobs and Contacts with other users in the organization. The record-level sharing is just an ...
    • What will happen to the records if a layout is deleted?

      When you attempt to delete a layout, you will be prompted to transfer the records of that layout to another existing layout.  Once you've deleted that layout, the records will be transferred to the layout that you have chosen.