Prevent form submit if the record has changed while the form was open

Prevent form submit if the record has changed while the form was open

We have a common situation that causes unexpected behaviors in our creator apps.  Does Zoho have a fix for this, since it must be common for lots of folks?

1. User A edits a record which opens the record to a form
2. The record is changed elsewhere (e.g. by User B editing the same record and submitting changes, or by a deluge task being run from another part of the app updating the record)
3. Then User A submits the form, and all data changes from step 2 are lost

I can write a validation workflow to fix this(see below), but then I would have to add this snippet of code to the On Validate workflow of every single form on my app.  I hate duplication of code like this, is there not a better way to prevent this situation?

this_record = form_name[ID == input.ID];
if(input.Modified_Time != this_record.Modified_Time)
{
      alert "You can't submit this form because the record has changed while you had the form open";
      cancel submit;
}
    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly Resources


                  Zoho Creator Resources


                    Zoho WorkDrive Resources



                      Zoho Campaigns Resources

                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

                          Writer is a powerful online word processor, designed for collaborative work.

                            Zoho CRM コンテンツ




                              ご検討中の方