My goal is to free all contacts of a specific custom fields group. In other words I want to clear all occurrences of a multiple records custom field set. May I truncate the civicrm_value_<customfieldsetname><id> table, is there an api method or how can I safely achieve this?

Thanks in advance // nielo

2 Answers 2


Pretty sure you can truncate the civicrm_value_customname table. I've done that before with no ill effects (assuming you don't have custom code running off those values).

  • Thanx a load! I'll try tonight.
    – nielo
    Commented Dec 8, 2015 at 13:21

Why do you need that?

Do you want to keep the fields, but only empty?

Deleting the fields would make the most sense to me. That can be done via the web interface.

  • No, I want to clear the fields. Sorry if I failed to point that one out. But in this case (multiple records) I think my wording is better than saying "clear" because the db rows have to be deleted.
    – nielo
    Commented Dec 8, 2015 at 10:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.