Hi all, I'm trying to delete a custom field and I'...
# general
m
Hi all, I'm trying to delete a custom field and I'm 100% sure it has no dependent records, but it gives me that error which I can't delete it, because it has dependent records. It also doesn't let me to change the Field ID as it errors You are not allowed to access this custom field. There's nothing under Sourcing & Filtering subtab đź§± Does anyone know how to delete the custom field?
m
When it gives you the dependent record error, it should give you a link to see which dependent records are attached. Did you try that yet?
m
Yes, the link shows no records, which I can't understand. It's a checkbox. It's not been used in any workflow, script and custom fields. So what's the dependent record?
m
Sometimes it could be part of some backend data that isn't referenced in these dependencies. Like in System Notes or Audit Trail. Can you just inactivate it instead of deleting?
m
Thanks @MGBC It gives me an error of This record cannot be inactivated because it has dependent records. It doesn't allow me to change the field's Id. It says You are not allowed to access this custom field.
m
Can you change its field TYPE to something else? That can usually delete all previous data that the field stored.
Like change it to a text field or something.
Just change the data type on the custom field. You will get a warning saying “Changing this custom field type will delete all data in existing records. Are you sure you want to do this?”
If that doesn’t work, maybe you can try doing a mass update to records with that field and uncheck all of them. Then you might be able to delete it.
m
Thanks @Michael McNamara I tried changing the custom field Type. Set it Non-Store Value, removed from customer and added back, but no joy. The field is new. I used Copy to Account from sandbox. It's become a mystery.
@Michael McNamara and @MGBC Solution: Change the field Type of the custom field then use in a transaction or record. Then you can delete it. I had used Copy to Account feature and copied from sandbox, so there could be some data/dependency from the source account. The custom fields are now deleted
m
Awesome! Glad you figures it out and thanks for sharing the solution!