v5 - Unable to Remove Custom Field

Am trying to remove a custom field which was created in the Customer form and am unable to do so. Error message is “Cannot delete standard field. You can hide it if you want”.

Just some extra details:

  • Created the field on row 20
  • Label: Flat Rate ID Number

Under customize_form.js i noticed that it tests for “if(!(row.is_custom_field || row.__islocal))” but I have been unable to trace where it pulls these values from. Anyone has an idea on this?

is_custom_field is set as true when Custom Fields are appended to the doctype object (meta)

I dumped the row array to see what contents are inside and it seems the is_custom_field attribute is not present.

The following describes the dump:

{“parent”:“Customize
Form”,“allow_on_submit”:0,“precision”:“”,“in_list_view”:0,“reqd”:0,"
unique":0,“in_filter”:0,“print_hide”:0,“name”:“Customer-flat_rate_id_no”
,“idx”:22,“ignore_user_permissions”:0,“doctype”:“Customize Form
Field”,“label”:“Flat Rate ID Number”,“parenttype”:“Customize
Form”,“fieldname”:“flat_rate_id_no”,“fieldtype”:“Data”,“hidden”:0,"
permlevel":0,“report_hide”:0,“parentfield”:“fields”}

Any idea why it has such behaviour?

@bohlian Fixed.

Update and check.

Yes it works now. Thanks.