Hi !
I’m comparing the Fields (shown within MySQL) with the fields in the DocType of “GL Entry”, and I’m astonished that for example I can’t see the field “exported to abacus” in the fieldlist of the Doctype. Can anybody explain me why ?
Thanks a lot.
Welcome to ERPNext!
A screen shot where you find this may help explain your context?
“exported to abacus” may be a custom field? or your instance includes a separate custom app?
To confirm this is the case query this table:
MariaDB [d56cb677eaab3383]> desc `tabCustom Field`;
+-------------------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------------------+--------------+------+-----+---------+-------+
| name | varchar(140) | NO | PRI | NULL | |
| creation | datetime(6) | YES | | NULL | |
| modified | datetime(6) | YES | | NULL | |
| modified_by | varchar(140) | YES | | NULL | |
| owner | varchar(140) | YES | | NULL | |
| docstatus | int(1) | NO | | 0 | |
| parent | varchar(140) | YES | MUL | NULL | |
| parentfield | varchar(140) | YES | | NULL | |
| parenttype | varchar(140) | YES | | NULL | |
| idx | int(8) | NO | | 0 | |
| collapsible | int(1) | NO | | 0 | |
| print_width | varchar(140) | YES | | NULL | |
| no_copy | int(1) | NO | | 0 | |
| depends_on | longtext | YES | | NULL | |
| _liked_by | text | YES | | NULL | |
| in_list_view | int(1) | NO | | 0 | |
| reqd | int(1) | NO | | 0 | |
| ignore_xss_filter | int(1) | NO | | 0 | |
| collapsible_depends_on | longtext | YES | | NULL | |
| in_filter | int(1) | NO | | 0 | |
| read_only | int(1) | NO | | 0 | |
| print_hide | int(1) | NO | | 0 | |
| _comments | text | YES | | NULL | |
| ignore_user_permissions | int(1) | NO | | 0 | |
| label | varchar(140) | YES | | NULL | |
| print_hide_if_no_value | int(1) | NO | | 0 | |
| width | varchar(140) | YES | | NULL | |
| hidden | int(1) | NO | | 0 | |
| permlevel | int(11) | NO | | 0 | |
| insert_after | varchar(140) | YES | | NULL | |
| _assign | text | YES | | NULL | |
| description | text | YES | | NULL | |
| search_index | int(1) | NO | | 0 | |
| allow_on_submit | int(1) | NO | | 0 | |
| precision | varchar(140) | YES | | NULL | |
| dt | varchar(140) | YES | MUL | NULL | |
| unique | int(1) | NO | | 0 | |
| _user_tags | text | YES | | NULL | |
| default | text | YES | | NULL | |
| fieldname | varchar(140) | YES | | NULL | |
| fieldtype | varchar(140) | YES | | Data | |
| options | text | YES | | NULL | |
| report_hide | int(1) | NO | | 0 | |
| in_filter_dash | int(1) | NO | | 0 | |
| in_standard_filter | int(1) | NO | | 0 | |
| in_global_search | int(1) | NO | | 0 | |
| bold | int(1) | NO | | 0 | |
| columns | int(11) | NO | | 0 | |
+-------------------------+--------------+------+-----+---------+-------+
48 rows in set (0.01 sec)
Here’s an example query:
MariaDB [d56cb677eaab3383]> select fieldname, fieldtype,name,description from `tabCustom Field`;
+------------------------------+-----------+---------------------------------------------+-------------+
| fieldname | fieldtype | name | description |
+------------------------------+-----------+---------------------------------------------+-------------+
| hub_sync_id | Data | Company-hub_sync_id | NULL |
| github_sync_id | Data | Deleted Document-github_sync_id | NULL |
| hub_sync_id | Data | Deleted Document-hub_sync_id | NULL |
| hub_sync_id | Data | Item-hub_sync_id | NULL |
| hub_sync_id | Data | Lead-hub_sync_id | NULL |
| compact_item_print | Check | Print Settings-compact_item_print | NULL |
| print_taxes_with_zero_amount | Check | Print Settings-print_taxes_with_zero_amount | NULL |
| github_sync_id | Data | Project-github_sync_id | NULL |
| dummyint | Int | Quotation-dummyint | NULL |
| appointment | Link | Sales Invoice-appointment | NULL |
| github_sync_id | Data | Task-github_sync_id | NULL |
+------------------------------+-----------+---------------------------------------------+-------------+
11 rows in set (0.00 sec)
Thanks for your friendly welcome and your help.
I’ve found this field in the list of customs fields which was expanded by the ERPNextSwiss-Package.
Sorry for this sensless question ;-((
Regards
P.S. probably it may be a good idea to see a flag at the DocType when there are customized fields for this DocType
Well yes lots of magic here that escapes me too!
For understanding this process completly I’ve added a user field to GL Entry. As expected the field was properly added to the table “GL Entry”.
But - after deletion of the added field in the list of custom fields the field was not removed from the GL Entry-Table within MySQL.
Is this a bug or a feature ;-))
Yes my experience and observation is the same as yours -
To add but then later delete a field from a DocType (via say Setup → DocType → Add Row), that custom field still remains as an artifact in the table schema.