{"id":1557,"date":"2018-03-16T10:14:12","date_gmt":"2018-03-16T09:14:12","guid":{"rendered":"https:\/\/help.cirrus-shield.com\/docs\/developer-guide\/javascript-library\/delete-record\/"},"modified":"2021-04-21T09:45:12","modified_gmt":"2021-04-21T08:45:12","slug":"delete-record","status":"publish","type":"docs","link":"https:\/\/help.cirrus-shield.com\/en\/docs\/developer-guide\/javascript-library\/delete-record\/","title":{"rendered":"Delete Record"},"content":{"rendered":"<p>This function is used to delete an existing record.<\/p>\n<ul>\n<li><strong><u>Function:<\/u><\/strong> DeleteRecord(&lt;Object Name&gt;, &lt;Matching Field&gt;, &lt;XML Data&gt;)\n<ul>\n<li>var ObjResult = DeleteRecord(&lt;Object Name&gt;, &lt;Matching Field&gt;, &lt;XML Data&gt;);<\/li>\n<li>var status = ObjResult.msgSuccess;<\/li>\n<li>var message = msgInfo;<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><u>XML Data Format:<\/u><\/p>\n<p>&#8220;&lt;Data&gt;&#8221;<\/p>\n<p>&#8220;&lt;Object Name&gt;&#8221;<\/p>\n<p>&#8220;&lt;Matching Field Name&gt;&#8221;<\/p>\n<p>Value<\/p>\n<p>&#8220;&lt;\/Matching Field Name&gt;&#8221;<\/p>\n<p>&#8220;&lt;\/Object Name&gt;&#8221;<\/p>\n<p>&#8220;&lt;\/Data&gt;&#8221;<\/p>\n<ul>\n<li><strong><u>Usage: <\/u><\/strong>var xmlStr = &#8220;&lt;Data&gt;&#8221;;<\/li>\n<\/ul>\n<p>xmlStr += &#8220;&lt;Task&gt;&#8221;;<\/p>\n<p>xmlStr += &#8220;&lt;Id&gt;&#8221;;<\/p>\n<p>xmlStr += objTask.Id;<\/p>\n<p>xmlStr += &#8220;&lt;\/Id&gt;&#8221;;<\/p>\n<p>xmlStr += &#8220;&lt;\/Task&gt;&#8221;;<\/p>\n<p>xmlStr += &#8220;&lt;\/Data&gt;&#8221;;<\/p>\n<p>var ObjResult = DeleteRecord(&#8220;Task&#8221;, &#8220;Id&#8221;, xmlStr);<\/p>\n<p>var status \u00a0= ObjResult.msgSuccess;<\/p>\n<p>var message = ObjResult.msgInfo;<\/p>\n<ul>\n<li><strong><u>Output:<\/u><\/strong>\n<ul>\n<li><strong><u>Success:<\/u><\/strong><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>A success flag is returned with value = true. The following message will be displayed \u201cRecord is deleted successfully.\u201d<\/p>\n<ul>\n<li><strong><u>Failure:<\/u><\/strong><\/li>\n<\/ul>\n<p>A success flag is returned with value = false. An error message will be displayed.<\/p>\n<p><!-- 2f7fb94386e75ac1379f8b68c38edfb6 --><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":945,"menu_order":15,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"doc_tag":[],"class_list":["post-1557","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/1557","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/comments?post=1557"}],"version-history":[{"count":5,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/1557\/revisions"}],"predecessor-version":[{"id":5436,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/1557\/revisions\/5436"}],"up":[{"embeddable":true,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/945"}],"next":[{"title":"Get Picklist Name","link":"https:\/\/help.cirrus-shield.com\/en\/docs\/developer-guide\/javascript-library\/get-picklist-name\/","href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/1558"}],"prev":[{"title":"Upsert Record","link":"https:\/\/help.cirrus-shield.com\/en\/docs\/developer-guide\/javascript-library\/upsert-record\/","href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/1556"}],"wp:attachment":[{"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/media?parent=1557"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/doc_tag?post=1557"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}