function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Unable to delete Custom Field due to "Assignment Rules"

Hi Folks,


I'm trying to delete a custom field via the MetaData api:



        CustomField cf = new CustomField();
        AsyncResult[] result = metadataConnection.delete(new Metadata[]{cf});
.... but it fails with:
DEPENDENCY_EXISTS msg: This custom field is referenced elsewhere in : Case Assignment Rules. This custom field is referenced elsewhere in : Case Escalation Rules.
My question is: How can I delete "Case Assignment Rules" and "Case Escalation Rules" via an API?
Thanks heaps!



You are not able to delete the field as the field is referenced in the Case assignment rule.


But unfortunitaely you can not delete the assignment rule through META DATA API.


Thanks and Regards,