1. Home
  2. /
  3. Developer Guide
  4. /
  5. JavaScript Library
  6. /
  7. Delete Record

Delete Record

This function is used to delete an existing record.

  • Function: DeleteRecord(<Object Name>, <Matching Field>, <XML Data>)
    • var ObjResult = DeleteRecord(<Object Name>, <Matching Field>, <XML Data>);
    • var status = ObjResult.msgSuccess;
    • var message = msgInfo;

XML Data Format:

“<Data>”

“<Object Name>”

“<Matching Field Name>”

Value

“</Matching Field Name>”

“</Object Name>”

“</Data>”

  • Usage: var xmlStr = “<Data>”;

xmlStr += “<Task>”;

xmlStr += “<Id>”;

xmlStr += objTask.Id;

xmlStr += “</Id>”;

xmlStr += “</Task>”;

xmlStr += “</Data>”;

var ObjResult = DeleteRecord(“Task”, “Id”, xmlStr);

var status  = ObjResult.msgSuccess;

var message = ObjResult.msgInfo;

  • Output:
    • Success:

A success flag is returned with value = true. The following message will be displayed “Record is deleted successfully.”

  • Failure:

A success flag is returned with value = false. An error message will be displayed.

Was this article helpful to you? No Yes

How can we help?