Delete Mass Records

This function is used to delete mass records and it returns a message result that contains the deleted records and the errors.

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

XML Data Format:

"<Data>"
"<Object Name>"
"<Matching Field Name>"
   Value1
"</Matching Field Name>"
"</Object Name>"
"<Object Name>"
"<Matching Field Name>"
   Value2
"</Matching Field Name>"
"</Object Name>"
"</Data>"
  • Usage:
var xmlStr = "<Data>";
xmlStr += "<Contact>";
xmlStr += "<Email>";
xmlStr += "elise.alice@gmail.com";
xmlStr += "</Contact>";
xmlStr += "<Contact>";
xmlStr += "<Email>";
xmlStr += "john.smith@gmail.com";
xmlStr += "</Email>";
xmlStr += "</Contact>";
xmlStr += "</Data>";

var ObjResult = DeletMassRecords("Contact", "Email", xmlStrContact);
var message = ObjResult.msgInfo;
  • Output:

    • The result message will be displayed as follow:
      • Success Records: Matching Field + “ – “ + Record GUID + “ – “ + True
      • Failed Records: Matching Field + “ – “ + Error Message + “ – “ + False
    • Example:
      • “john.smith@gmail.com – This Record does not Exist – False; elise.alice@gmail.com  – 1825492168588921251 – True;”
Was this article helpful to you? Yes No

How can we help?