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

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




                              ご検討中の方