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
kerryland6kerryland6 

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();
        cf.setFullName("Account.SLA__c");
        AsyncResult[] result = metadataConnection.delete(new Metadata[]{cf});
.... but it fails with:
DEPENDENCY_EXISTS msg: This custom field is referenced elsewhere in salesforce.com. : Case Assignment Rules. This custom field is referenced elsewhere in salesforce.com. : Case Escalation Rules.
My question is: How can I delete "Case Assignment Rules" and "Case Escalation Rules" via an API?
Thanks heaps!
Kery

 

NasipuriNasipuri

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,

Dinesh

dinesh.nasipuri@gmail.com