I am having problem in deleting custom fields permanently.
Like for e.g. I have created a custom field in Contact entity with name "Newsletter" which Salesforce internaly stores as "Newsletter__c" as custom field.
Then I use the below code to delete custom field of contact.
var cstField = new CustomField
{
type = FieldType.Checkbox,
fullName = "Contact.Newsletter__c"
};
// Delete the object
var r = metaService.delete(new Metadata[] { cstField })[0];
The above code deletes the custom field, but keeps it under "DeletedFields" category where you can again "Erase" or "Undelete" the custom field. These custom fields are deleted automatically after 15 days.
I want to delete the custom fields from these category also as if I again create cf with same name SF gives error like "Already exists".
I tried purgeOnDelete option too while deploying but no luck so far.