Blogs
   Forums   Creator Home
 Toll Free : 888 900 9646

API Home >> Creator API  >> XML API  >> XML - RPC API Methods >> Delete Record

 


Delete record - XML Format



Zoho Creator XML
- RPC Web API allows client applications to delete records from a Zoho Creator form, using the HTTP POST method. The records that satisfy the given criteria will be deleted. You can specify multiple criteria using "AND"/ "OR" operator. In return, the user gets a formatted XML response from the called method. 

Who can delete a record ?

Only the owner of the application with valid APIKey can delete a record in ZohoCreator.
 

Request URL

The request url to add, delete or update a record in xml format is given below:

 http://creator.zoho.com/api/xml/write



Request Format

The request parameters comprises of comma seperated values to be specified in the following format:

<ZohoCreator>

<applicationlist>
<application name="app name">
</formlist>
<form name="form  name">
<delete>
<criteria>
<field name="field Name" compOperator="compOperator" value="field value"></field>
<reloperator>AND/OR</reloperator>
<field name="field Name" compOperator="compOperator" value="field value"></field>
</criteria>
</delete>
</form>
</formlist>
</application>
</applicationlist>
</Zohocreator>


Note:
 
1. The values that can be specified for the <compOperator> is given below:


2. The values that can be specified for the <reloperator> is given below:
3. For fields of type multi-select, only one list value can be specified as criteria.

4. Only Deluge Script names must be specified for form names, field names and application name. Refer http://creator.zoho.com/api/referenceto view the list of applications created, the form names and field names used in each application and the deluge names. 


Sample Form (POST Method Format)

<form method="POST"    action="http://creator.zoho.com/api/xml/write/apikey=[APIKEY]&ticket=[Ticket]">

<input type="hidden" name="XMLString" value="XML String in the format as specified in the Request format">

<input type="submit" value="Sumit XML String">

</form>




Sample Request
 

1. Sample request to delete a single record:



<zohocreator>
<applicationlist>
<application name="sample">
<formlist>
<form name="Employee_Form">
<delete>
<criteria>
<field name="Name" compOperator="EQUALS" value="Smith"></field>
<reloperator>AND</reloperator>
<field name="Hobbies" compOperator="EQUALS" value="Reading"></field>
</criteria>
</delete>
</form>
</formlist>
</application>
</applicationlist>
</zohocreator>



2. Sample request to delete a record in multiple forms.

In the following sample, the delete criteria for each form is specified within seperate <form> </form> tags.


<zohocreator>

<applicationlist>
<application name="sample">
<formlist>
<form name="Employee_Form">
<delete>
<criteria>
<field name="Hobbies" compOperator="Contains" value="Music"></field>
</criteria>
</delete>
</form>

<form name="Department">
<delete>
<criteria>
<field name="Department_Name" compOperator="Equals" value="Administration"></field>
</criteria>
</delete>
</form>
</formlist>
</application>
</applicationlist>
</zohocreator>



3.
Sample request to delete a record in multiple applications

The delete criteria for each form is specified within seperate <form> </form> tags.


<zohocreator>

<applicationlist>

<application name="sample">
<formlist>
<form name="Employee_Form">
<delete>
<criteria>
<field name="Joining_Date" compOperator="Before" value="01-01-2007"></field>
<reloperator>AND</reloperator>
<field name="Basic" compOperator="LessThanOrEqual" value="10000"></field>
</criteria>
</delete>
</form>
</formlist>
</application>

<application name="leave-application">
<formlist>
<form name="Leave_Form">
<delete>
<criteria>
<field name="Employee_Email" compOperator="EQUALs" value="smith@yahoo.com"></field>
</criteria>
</delete>
</form>
</formlist>
</application>
</applicationlist>
</zohocreator>



Sample Response

The response tags comprises of the form name, the delete criteria and the status as shown in the sample below:

<response>
<result>
<form name="Employee_Form>
<delete>
<criteria>
<field name="Name" compOperator="EQUALs" value="Smith"/>
<reloperator>AND</reloperator>
<field name="Hobbies" compOperator="EQUALs" value="Reading"/>
</criteria>
<status>Success</status>
</delete>
</form>
</result>
</response>


If there is an error in the request format, the corresponding error code with the error message will be displayed. Please refer the topic, Error codes and description, to learn about the list of error code displayed.


If the record is added to the database, the response message will be displayed with status as "Success".