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.

    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

                                                                                                  • 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. ...
                                                                                                  • 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: ...
                                                                                                  • Understand successful record deletion

                                                                                                    The 'Delete' event are the ones that are triggered when record is deleted. The 'Successful record deletion' action will executed after a record is deleted in a form. You can configure different actions like notification, data access etc for the ...
                                                                                                  • Configure successful record deletion action

                                                                                                    To configure validations on record deletion action: While creating a new workflow choose the Successful record deletion option in the When to trigger workflow dropdown. Click the Add New Action block. The Deluge script builder window will slide in ...
                                                                                                    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