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.


        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


                                    All-in-one knowledge management and training platform for your employees and customers.

                                              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

                                                                                                                                • Understanding delete record action

                                                                                                                                  The Delete Record action in data access of workflows is a variant of the same action in deluge script. In the latter, you need to create the code for deleting a record in the script builder. Instead, you can use the predefined action available. When ...
                                                                                                                                • Add annotations

                                                                                                                                  Add annotations Refer to this page to learn about the AR field You can add up to 30 annotations for each 3D model in your AR set. Navigate to the Edit mode of your app. Open the builder of the required form. Select the required AR field and navigate ...
                                                                                                                                • Perform end-of-month auditing using Audit Trail

                                                                                                                                  Requirement Perform regular end-of-month auditing of a hardware company using Zoho Creator's Audit Trail feature. Use case All purchases and sales of a hardware company are maintained in a Zoho Creator sales management app. A record will be created ...
                                                                                                                                • Conditions to filter records based on Creator fields

                                                                                                                                  In a nutshell Learn about the criteria that you can set to filter records and run workflows within the Creator application. 1. Overview Conditions help in filtering records from a Zoho Creator report. Based on the criteria set in a condition, actions ...
                                                                                                                                • Add AR Viewer

                                                                                                                                  Add AR Viewer to your page Refer to this page to learn about the AR Viewer . Navigate to the Edit mode of your app. Open the page in which you want to add the AR Viewer . Click Viewer from the page builder menu on the left side. Drag and drop the AR ...
                                                                                                                                  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