Answers.Body: <p>If you have the ID of the row you want to delete and the custom group ID you can use <code>CRM_Core_BAO_CustomValue::deleteCustomValue</code></p>
  
  <pre><code>$dao = CRM_Core_BAO_CustomGroup::class;
  $groupID = CRM_Core_DAO::getFieldValue($dao, 'Emergency_Contacts', 'id', 'name');
  CRM_Core_BAO_CustomValue::deleteCustomValue($id, $groupID);
  </code></pre>
  
  <p>Which deletes an entire row from the custom value table for this custom group.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-09T21:07:16.850Z
Answers.Text: It's not really what you asked for (an API call) but I couldn't find anything else and this helped me anyway.
Answers.UserDisplayName: mickadoo
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-10T20:17:00.387Z
Answers.Text: Yeah, this could be useful. Too sad I don't remember for what exact reason I did ask this question :D But I know, it will be beneficious some day.
Answers.UserDisplayName: nielo
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-09T10:30:52.297Z
Answers.LastActivityDate: 2017-11-09T10:30:52.297Z
Answers.UserDisplayName: mickadoo
Answers.Body: <p>Currently, you can't do this. If you try, you will get the notice:</p>
  
  <blockquote>
    <p>API (CustomValue, delete) does not exist (join the API team and
    implement it!)</p>
  </blockquote>
  
  <p>This is true for CiviCRM version 4.7.7, which is current at time of writing.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-26T14:53:04.463Z
Answers.Text: I just checked the latest version and you do have replace option in this version - just replace the custom value to the new value - you dont have to delete the row
Answers.UserDisplayName: Ramesh - ARTECH Consultancy
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-26T15:36:31.943Z
Answers.Text: Replace is not the same as delete. Delete implies there *is* no new value.
Answers.UserDisplayName: moopet
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-26T15:48:56.620Z
Answers.Text: If that is the case - please create a new issue for the same which will get fixed in the future release - thanks
Answers.UserDisplayName: Ramesh - ARTECH Consultancy
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-26T16:00:07.840Z
Answers.Text: I don't have a separate question - I am answering the question here.
Answers.UserDisplayName: moopet
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-26T14:04:48.273Z
Answers.LastActivityDate: 2016-05-26T14:04:48.273Z
Answers.UserDisplayName: moopet
Answers.Body: <p>API delete option for Custom value is missing in this version 
  Please upgrade your Civicrm version to the latest version of Civicrm  </p>
  
  <p>please give a quick test  <a href="http://d46.demo.civicrm.org/civicrm/api/explorer#explorer" rel="nofollow">http://d46.demo.civicrm.org/civicrm/api/explorer#explorer</a> 
  where you will find the delete action </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-29T08:49:50.437Z
Answers.Text: Thank you. Although there is no such option in the linked demo-civicrm, I assume you're right and it's a version problem. Hope 4.7 will fix it – I'll upgrade in the next days.
Answers.UserDisplayName: nielo
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-26T13:56:14.337Z
Answers.Text: That link is out of date. Also version 4.7.7 does not have the option to delete either, so this answer is wrong.
Answers.UserDisplayName: moopet
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-26T14:46:24.760Z
Answers.Text: @moopet the answer was give to version civi 4.6.10 - if you need the same option for the latest if it is missing then please raise a issue
Answers.UserDisplayName: Ramesh - ARTECH Consultancy
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-26T15:34:38.707Z
Answers.Text: Your answer doesn't say anything about whether it appears in a newer version or not - your link is broken and from the look of it (d46.*) it's for the same version in the question comments.
Answers.UserDisplayName: moopet
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-10T20:18:31.313Z
Answers.Text: Sorry, had to accept another answer.
Answers.UserDisplayName: nielo
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-28T12:21:36.300Z
Answers.LastActivityDate: 2016-01-28T12:21:36.300Z
Answers.UserDisplayName: Ramesh - ARTECH Consultancy
Answers.Body: <p>Do you mean the value entered in a custom field, or an available option?</p>
  
  <p>If the former, you should enter an empty string using <code>custom_value.create</code> api.</p>
  
  <p>For the latter, use <code>option_value.delete</code> api.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-25T19:23:48.730Z
Answers.Text: Thanks. It's the former. But your solution does not make the contact to "not-have" that custom value. I meant, if I attach a set of a multiple records custom dataset to an entity, how to delete and detach this dataset, so that the contact appears as if it never had such custom data. At the moment a contact which gets such a dataset will forever be found when searching for contacts holding such datasets.
Answers.UserDisplayName: nielo
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-25T17:21:22.110Z
Answers.LastActivityDate: 2016-10-25T17:21:22.110Z
Answers.UserDisplayName: Coleman
Body: <p>I may be blind but I can't see any api call to delete a custom value?! </p>
  
  <p>CustomValue entity is missing a delete action.</p>
  
  <p>What am I missing?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-01-28T09:13:10.103Z
Comments.Text: Please let me know what version of Civicrm are you using
Comments.UserDisplayName: Ramesh - ARTECH Consultancy
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-01-28T10:53:35.883Z
Comments.Text: sorry. current drupal 7, civi 4.6.10
Comments.UserDisplayName: nielo
Tags: <api><custom-fields><developer>
Title: API: How do I delete a custom value?
ThreadText: # API: How do I delete a custom value?
  
  (Asked by: username_0 on 2016-01-27)
  
  I may be blind but I can't see any api call to delete a custom value?!
  
  CustomValue entity is missing a delete action.
  
  What am I missing?
  
  **Tags:** api, custom-fields, developer
  
  > **Comments:**
  > **username_1**: Please let me know what version of Civicrm are you using  
  > **username_0**: sorry. current drupal 7, civi 4.6.10  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_2 on 2017-11-09. Score: 2 | Accepted answer
  
  If you have the ID of the row you want to delete and the custom group ID you can use CRM_Core_BAO_CustomValue::deleteCustomValue
  $dao = CRM_Core_BAO_CustomGroup::class;
  $groupID = CRM_Core_DAO::getFieldValue($dao, 'Emergency_Contacts', 'id', 'name');
  CRM_Core_BAO_CustomValue::deleteCustomValue($id, $groupID);
  
  Which deletes an entire row from the custom value table for this custom group.
  
  > **Comments:**
  > **username_2**: It's not really what you asked for (an API call) but I couldn't find anything else and this helped me anyway.  
  > **username_0**: Yeah, this could be useful. Too sad I don't remember for what exact reason I did ask this question :D But I know, it will be beneficious some day.  
  
  ---
  
  ### Answer by username_3 on 2016-05-26. Score: 4
  
  Currently, you can't do this. If you try, you will get the notice:
  
  > API (CustomValue, delete) does not exist (join the API team and
  > implement it!)
  
  This is true for CiviCRM version 4.7.7, which is current at time of writing.
  
  > **Comments:**
  > **username_1**: I just checked the latest version and you do have replace option in this version - just replace the custom value to the new value - you dont have to delete the row  
  > **username_3**: Replace is not the same as delete. Delete implies there *is* no new value.  
  > **username_1**: If that is the case - please create a new issue for the same which will get fixed in the future release - thanks  
  > **username_3**: I don't have a separate question - I am answering the question here.  
  
  ---
  
  ### Answer by username_1 on 2016-01-28. Score: 1
  
  API delete option for Custom value is missing in this version
  Please upgrade your Civicrm version to the latest version of Civicrm
  
  please give a quick test <http://d46.demo.civicrm.org/civicrm/api/explorer#explorer>
  where you will find the delete action
  
  > **Comments:**
  > **username_0**: Thank you. Although there is no such option in the linked demo-civicrm, I assume you're right and it's a version problem. Hope 4.7 will fix it – I'll upgrade in the next days.  
  > **username_3**: That link is out of date. Also version 4.7.7 does not have the option to delete either, so this answer is wrong.  
  > **username_1**: @username_3 the answer was give to version civi 4.6.10 - if you need the same option for the latest if it is missing then please raise a issue  
  > **username_3**: Your answer doesn't say anything about whether it appears in a newer version or not - your link is broken and from the look of it (d46.*) it's for the same version in the question comments.  
  > **username_0**: Sorry, had to accept another answer.  
  
  ---
  
  ### Answer by username_4 on 2016-10-25. Score: 1
  
  Do you mean the value entered in a custom field, or an available option?
  
  If the former, you should enter an empty string using `custom_value.create` api.
  
  For the latter, use `option_value.delete` api.
  
  > **Comments:**
  > **username_0**: Thanks. It's the former. But your solution does not make the contact to "not-have" that custom value. I meant, if I attach a set of a multiple records custom dataset to an entity, how to delete and detach this dataset, so that the contact appears as if it never had such custom data. At the moment a contact which gets such a dataset will forever be found when searching for contacts holding such datasets.  
  
  ---
  
  