Store records for 30 days after deletion

Store records for 30 days after deletion


Deleted records must be stored for 30 days after deletion, after which they should be permanently removed from the database.

Use Case

A library management app is used to manage books, memberships, and other resources. When a membership is cancelled, it can be reclaimed within the next 30 days. After 30 days, customers need to purchase a new membership, if required. So, cancelled membership records are stored for 30 days before before being permanently removed from the database.

Steps to follow

1. Create two forms with the following details:
Form Link Name
Field Type
Field Name
Field Link Name
Add Member
Single Line
Phone Number
Auto Number
Member ID
Cancelled Membership
Single Line
Member ID
Let's create a workflow to move deleted records from Add Member form to Cancelled Membership form
2. Create workflow with the following details.
The workflow is to be triggered when a record is being deleted , so we are selecting the Form Event as "Validations on record deletion".
3. Click Add New Action > Deluge Script, and save the following D eluge snippet in the Deluge editor:
  1. var = insert into Cancelled_Membership
  2. [
  3.   Added_User=zoho.loginuser
  4.   Name=input.Name
  5.   Member_ID=input.Member_ID
  6. ];
The snippet uses the add records Deluge task to add the member's details in Cancelled Membership form when a member's record is deleted from the Add Member form.
4. Next, let's create a workflow in Schedules to delete the records in the Cancelled Membership form after 30 days.
We have selected Added Time as the Start date field, so that records are deleted 30 days after they have been added.
5. Click Add New Action > Deluge Script and save the following script in the editor
  1. delete from Cancelled_Membership [ ID == input.ID ];

See how it works  

Points to note  

  • Form Event can also be set as "Successful record deletion" instead of "Validations on record deletion". However, it is safer to use the current method, since records are added to the other form before the records are deleted from the current form.
  • We can add a custom button to the Cancelled Membership form to add the member's record back to the Add Member form if a member decides to retain the membership .
  • A daily schedule can also be configured to delete records that have completed 30 days.

    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

            Get started with Zoho Sign

            in a few quick steps!

            Download Help Guide

                        Still can't find what you're looking for?

                        Write to us:



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

                                                    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

                                                                                      • Related Articles

                                                                                      • Delete choice

                                                                                        Delete a choice from a choice field Applicable to the following choice fields: Drop down , radio , multi select , and checkbox . Open the form builder. Select the required field. Navigate to the  Field Properties > Choices  section on the right. ...
                                                                                      • Delete and duplicate records

                                                                                        This API service lets you manage the different functionalities in a report. Delete and duplicate records Methods deleteRecords(withRecordIDs:in:completionHandler:)This deletes one or more records from the report.   ...
                                                                                      • Adding Records

                                                                                        Overview A record in Zoho Creator is a row of data submitted through a form. The data submitted through a form is stored in the application itself and reports help present it in a meaningful way. Who can add records? The application owner Shared ...
                                                                                      • Delete field

                                                                                        Delete a field from a form Open the component menu as shown below, then select the required form. Its  Design  page will appear. Hover on the form's preview, then click  Open Form Builder . Select the required field. Click the  Delete  icon on the ...
                                                                                      • Delete and duplicate records

                                                                                        ZCReportAPIUtil This utility lets you make use of the reports of your Zoho Creator applications in your Android apps. Note: Zoho Creator's Mobile SDK is currently a Beta feature. We do not recommend using it for apps in the production stage. Methods ...
                                                                                      Wherever you are is as good as
                                                                                      your workplace



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


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


                                                                                        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