Delete Record by ID

Table of Contents

Overview

This JS API task deletes a specific record displayed by a report of your Zoho Creator application. It is deleted from the stored form and hence will not be available anywhere in the application. The delete request is subject to custom validations configured for the target form.

This task is based on the Delete Record by ID  REST API V2.1. Learn more about understanding the response

Request Details

Syntax

ZOHO.CREATOR.DATA.deleteRecordById(config).then(function(response){
   //callback block
});

Syntax Details

The syntax holds:

  • <config> (object) - The configuration required to delete a specific record in a report. This configuration includes the following parameters.
NameTypeDescription
app_name
(Optional)
string

Link name of the application in which the record needs to be deleted. Retrieve the link name using the Creator report's URL: https://creatorapp.zoho.com/<account_name>/<app_name>/#Report:<report_name>

Note: This parameter only needs to be passed when you need to a delete record in other applications of the same Creator account. When not specified, the record will be deleted from the current application.
report_namestringLink name of the report in which the record needs to be deleted. Retrieve the link name using the Creator report's URL: https://creatorapp.zoho.com/<account_name>/<app_name>/#Report:<report_name>
idstringRecord ID of the record that needs to be deleted.
payloadobjectSpecific parameters supplied in JSON format perform actions upon successful deletion of  the record.

Payload Parameter

  • skip_workflow (Optional)
    list
    Prevents the associated workflows from being executed when the record is deleted.
    Possible values: form_workflow, schedules, all

    Note: By default:

    • When more than one type of workflow is mentioned, supply them as comma-separated values in a list. For example,
      "skip_workflow" : ["schedules","form_workflow"]
    • If this parameter is not supplied, all associated workflows will be triggered.
    • Blueprints will be triggered when the record is deleted and cannot be skipped. 

Possible Errors

Refer to this page for the complete list of error codes and messages.

Sample Input

Copiedvar config = {
  app_name: "zylker",
  report_name: "All-Timesheet",
  id: "2000000245119",
  payload : {
    skip_workflow: ["form_workflow"],
  }
};
ZOHO.CREATOR.DATA.deleteRecordById(config).then(function (response) {
  if (response.code == 3000) {
    console.log(response);
  }
});

Sample Response

Copiedresponse = {
   "result": [{
       "code": 3000,
       "data": {
         "ID": "2000000245119"
       },
       "message": "success"
     }
   ],
 "code": 3000
}