Update other records values based on last record input

Update other records values based on last record input

Hello Community, 

Maybe a simple question for you guys, but I'm struggling with the following use case. 
We need to ensure we have only Approved Supplier which we can deal with. Those approvals are based on evaluation and qualification as shown in the illustration below. 

The example shows historical qualifications for the same supplier, and whatever the Qualification Status is, it is always the latest date that counts to show this supplier as approved. Therefor I'm using the "LATEST" column to filter my report with only approved suppliers. 

The issue I have is to ensure that when there's a new qualification (so a new record) with a more recent date, I would like all the history of "LATEST" to get the value "OLD"

I'm using the following script but does not seem to help. Any idea of what I'm doing wrong ?

  1. for each  rec in NEW_QUALIFICATION[QUALIFICATION_DATE > input.QUALIFICATION_DATE && SUPPLIER_NAME = input.SUPPLIER_NAME]
  2. {
  3. rec.LATEST="OLD";
  4. }


    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 コンテンツ




                              ご検討中の方