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.