How to delete a record in Zoho Creator from a Deluge function in CRM

How to delete a record in Zoho Creator from a Deluge function in CRM

Hello,

I've got a Deluge function in the Zoho CRM triggered by workflow with this code, trying to delete a record containing a product code.

  1. creatorApiUpdateUrl = "https://www.zohoapis.eu/creator/v2.1/data/xxxxxxxx/yyyyyyyy/report/All_Courses";
  2. payload.put("criteria","(Course_Code==\"" + coursecode + "\")");
  3. info "(Course_Code == '" + coursecode + "')";
  4. info payload;
  5. // Delete
  6. deletePayload = Map();
  7. deletePayload.put("criteria","(Course_Code==\"" + coursecode + "\")");
  8. //deletePayload.put("skip_workflow", ["form_workflow"]);
  9. //deletePayload.put("result", {"message": true, "tasks": true});
  10. info "-------- DELETE PAYLOAD --------";
  11. info deletePayload;
  12. creatorApiDeleteResp = invokeurl
  13. [
  14. url : creatorApiUpdateUrl
  15. type : DELETE
  16. parameters : deletePayload
  17. connection : "creatorfunctions"
  18. ];
  19. info "-------- DELETE RESPONSE ---------";
  20. info creatorApiDeleteResp;
The payload looks like this.

  • {"criteria":"(Course_Code==\"SKU TEST01\")"}
I keep getting this error...

  • {"code":1060,"description":"Invalid request parameter found - criteria"}
I've been closely following the documentation and don't understand why this is giving me an error. How can I solve this?

Thanks

    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