Update Record Example Deluge Script

Update Record Example Deluge Script

Hi,
I need to write a deluge script to update a Projects task. Since the "update" API asks for "Record Id" , I must fetch the task first, then update it. 
Here the issue is that: I must pick the Task Id from the response object of the getRecords API, turn it into number then use it in update API. This requires coding skills and debug capabilities.

I've tried the below script, but it is not working. 
If you share an example script, it will be a good contribution for me and the community. 


taskName = "Service Request - " + input.ID;
data_map = Map();
data_map.put("name", taskName);
response1 = zoho.projects.getRecords("Zylker", 160XXXXXXX125, "tasks", data_map);

taskId = response1.get("task_id").get(0);

values_map = Map();
values_map.put("percent_complete", 90);
response2 = zoho.projects.update("Zylker" , 160XXXXXXX125, "tasks", taskId, values_map);

    Access your files securely from anywhere


          All-in-one knowledge management and training platform for your employees and customers.






                                Zoho Developer Community




                                                      • Desk Community Learning Series


                                                      • Digest


                                                      • Functions


                                                      • Meetups


                                                      • Kbase


                                                      • Resources


                                                      • Glossary


                                                      • Desk Marketplace


                                                      • MVP Corner


                                                      • Word of the Day


                                                      • Ask the Experts





                                                                Manage your brands on social media



                                                                      Zoho TeamInbox Resources



                                                                          Zoho CRM Plus Resources

                                                                            Zoho Books Resources


                                                                              Zoho Subscriptions Resources

                                                                                Zoho Projects Resources


                                                                                  Zoho Sprints Resources


                                                                                    Qntrl Resources


                                                                                      Zoho Creator 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


                                                                                                Zoho Show Resources

                                                                                                  Zoho Writer

                                                                                                  Get Started. Write Away!

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

                                                                                                    Zoho CRM コンテンツ





                                                                                                      Nederlandse Hulpbronnen


                                                                                                          ご検討中の方