How to update a record and canceling the submit of the form?

How to update a record and canceling the submit of the form?

Hello,

I am trying to update a record with the data introduced in a form, but I dont want to create a new entry in te report, only update the entry that exists. 

I tried checking if the entry exists with On Validate, but if I use "cancel submit", the entry does not update. Although if I delete "cancel submit", the entry updates but a new entry with the form data appears, and that is the thing I dont want. 

Is there a way to do this? This is my simple code

  1. if (Equipo_Comercial[SalespersonID != input.SalespersonID].count()  >  0)
  2. {
  3. actualizar = Equipo_Comercial[SalespersonID == input.SalespersonID];
  4. actualizar.Nombre = "Test"; 
  5.         alert "Actualizado";
  6. cancel submit;
  7. }
    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 コンテンツ




                              ご検討中の方