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.
- creatorApiUpdateUrl = "https://www.zohoapis.eu/creator/v2.1/data/xxxxxxxx/yyyyyyyy/report/All_Courses";
- payload.put("criteria","(Course_Code==\"" + coursecode + "\")");
- info "(Course_Code == '" + coursecode + "')";
- info payload;
- // Delete
- deletePayload = Map();
- deletePayload.put("criteria","(Course_Code==\"" + coursecode + "\")");
- //deletePayload.put("skip_workflow", ["form_workflow"]);
- //deletePayload.put("result", {"message": true, "tasks": true});
- info "-------- DELETE PAYLOAD --------";
- info deletePayload;
- creatorApiDeleteResp = invokeurl
- [
- url : creatorApiUpdateUrl
- type : DELETE
- parameters : deletePayload
- connection : "creatorfunctions"
- ];
- info "-------- DELETE RESPONSE ---------";
- 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
Deliver unforgettable customer experiences
Deliver unforgettable customer experiences
New to Zoho Marketing Plus?
Everything you need to run your marketing
New to Zoho Marketing Plus?
Everything you need to run your marketing
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
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
Zoho Show Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.