Print this page

Why can't I delete a field in the Contact object that is being referenced by a criteria-based Sharing rules if the Sharing is "Controlled By Parent"?

Knowledge Article Number 000205508
Description I can't delete a custom field on the Contact object because it is referenced on a criteria-based sharing rule.
The error message I receive is "Unable to Complete the Requested Change" and it mentions that "This custom field is referenced elsewhere in salesforce.com" as shown below:

User-added image

This field and the criteria-based rule were created before the activation of Person Accounts. Since person accounts have been enabled, I cannot access the criteria-based sharing rule and delete it in order to be able to delete the custom field. What can I do?
 
Resolution Please note, this scenario occurs when the Organization-wide Defaults of the org are changed to "Controlled by Parent". This is one of the mandatory steps when you want to enable Person Accounts.

There are two possible solutions:

If you don't have "Person Accounts" enabled
You can change back the sharing organization-wide defaults from "Controlled by Parent" to any other (Private, Public Read Only, Public Read / Write). If you don't want to change it please continue to the next section.

If you have "Person Accounts" enabled
The first thing we need would be to obtain the Id of the criteria-based sharing rule, for this we can use Workbench.

Open Workbench, click on Info - "Metadata Types & Components" - Select the "ContactCriteriaBasedSharingRule and you would obtain the rule Id.

User-added image
Once you have that you can access the rule via the User Interface with the following URL:
https://instance.salesforce.com/setup/own/shareRule.jsp?retURL=%2Fp%2Fown%2FOrgSharingDetail%3FretURL%3D%252Fui%252Fsetup%252FSetup%253Fsetupid%253DSecurity%26setupid%3DSecuritySharing&id=03HB00000000006&entity=03D

Where "instance" is your salesforce instance / domain and the "id=" variable needs to be changed with the Id you obtained previously.

You can also delete the Rule by using the following URL:
https://instance.salesforce.com/p/own/SharingRuleWaitingDeletePage?delID=03HB00000000006&retURL=%2Fp%2Fown%2FOrgSharingDetail%3FretURL%3D%252Fui%252Fsetup%252FSetup%253Fsetupid%253DSecurity%26setupid%3DSecuritySharing&isCBS=1&entityLabel=Contact&

Where "instance" is your salesforce instance / domain and the "delID=" variable needs to be changed with the rule Id, as mentioned previously.

You'll get an error message related to your session but you will be able to remove the rule if you click the "Delete" link highlighted below.
User-added image
After removing the Criteria-Based Sharing Rule you will be able to delete the field without any errors.




promote demote