diff --git a/frappe/custom/doctype/custom_field/custom_field.py b/frappe/custom/doctype/custom_field/custom_field.py index bc325b654e..ee6e3b9c61 100644 --- a/frappe/custom/doctype/custom_field/custom_field.py +++ b/frappe/custom/doctype/custom_field/custom_field.py @@ -32,6 +32,7 @@ class CustomField(Document): self.fieldname = self.fieldname.lower() def before_insert(self): + self.set_fieldname() meta = frappe.get_meta(self.dt, cached=False) fieldnames = [df.fieldname for df in meta.get("fields")]