Problem retrieving the record ID

Problem retrieving the record ID

Hello, I have a case containing 2 tasks.



I would like to set up an automated system to determine the status of a case on the basis of the statuses of 2 associated tasks.
Here is the use case, When a user updates the status of a task,
1- retrieve the record ID of the task,
2- search for the case associated with the modified task on the basis of the record ID of the task,
3- search for all the associated tasks on the basis of the record ID of the case,
4- if all the tasks have a status of "Done", then the result status is "Done", otherwise it is "In progress",
5- update the status of the case with the result status on the basis of the record ID of the case.

I have configured a workflow and a custom function as follows:


     


(The business logic for calculating the result status has been simplified to make the code easier to read)

The result was inconclusive.

Any idea what's wrong?

    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • Functions

                                                                            Functions

                                                                          • Meetups

                                                                            Meetups

                                                                          • Kbase

                                                                            Kbase

                                                                          • Resources

                                                                            Resources

                                                                          • Digest

                                                                            Digest

                                                                          • CRM Marketplace

                                                                            CRM Marketplace

                                                                          • MVP Corner

                                                                            MVP Corner





                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now