Store records for 30 days after deletion

Store records for 30 days after deletion

Requirement

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
Form Link Name
Field Type
Field Name
Field Link Name
Add Member
Add_Member
Single Line
Name
Name
Phone
Phone Number
Phone_Number
Email
Email
Email
Image
Photo
Photo
Auto Number
Member ID
Member_ID
Cancelled Membership
Cancelled_Membership
 
Name
Name
Name
Single Line
Member ID
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.

    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 Links Workflow Automation Data Collection
                          Web Forms Enterprise Begin Data Collection
                          Interactive Forms Workplace Data Collection App
                          Encrypted Forms Customer Service Accessible Forms
                          Digital Forms Marketing Forms for Small Business
                          HTML Forms Education Forms for Enterprise
                          Contact Forms E-commerce Forms for any business
                          Lead Generation Forms Healthcare Forms for Startups
                          Wordpress Forms Customer onboarding Order Forms for Small Business
                          No Code Forms Construction RSVP tool for holidays
                          Free Forms Travel
                          Prefill Forms Non-Profit

                          Intake Forms Legal
                          Mobile App
                          Form Designer HR
                          Mobile Forms
                          Card Forms Food Offline Forms
                          Assign Forms Photography
                          Mobile Forms Features
                          Translate Forms Real EstateKiosk in Mobile Forms
                          Electronic Forms

                          Notification Emails for Forms Alternatives
                          Holiday Forms Google Forms alternative 
                          Form to PDF Jotform alternative





                                            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









                                                                                                              • 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. Click ...
                                                                                                              • 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 right: ...
                                                                                                              • 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

                                                                                                                  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