Custom link to custom doctype


I am trying to implement ERPNext in our company. I created a custom doctype to have a list of colors and our color codes.
Then I created a custom field on items doc which is linked to the customdoctype. But I keep getting this error whenever I try to select a value on the custom field.

Traceback (innermost last):
File “/home/erpnext/frappe-bench/apps/frappe/frappe/”, line 67, in application
response = frappe.handler.handle()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/”, line 74, in handle
File “/home/erpnext/frappe-bench/apps/frappe/frappe/”, line 99, in execute_cmd
ret =, **frappe.form_dict)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/”, line 758, in call
return fn(*args, **newargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/desk/”, line 13, in search_link
search_widget(doctype, txt, query, searchfield=searchfield, page_len=page_len, filters=filters)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/desk/”, line 88, in search_widget
File “/home/erpnext/frappe-bench/apps/frappe/frappe/desk/”, line 17, in execute
return DatabaseQuery(doctype).execute(*args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/”, line 50, in execute
return self.build_and_run()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/”, line 53, in build_and_run
args = self.prepare_args()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/”, line 67, in prepare_args
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/”, line 160, in remove_user_tags
columns = frappe.db.get_table_columns(self.doctype)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/”, line 746, in get_table_columns
return [r[0] for r in self.sql(“DESC tab%s” % doctype)]
File “/home/erpnext/frappe-bench/apps/frappe/frappe/”, line 146, in sql
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
ProgrammingError: (1146, “Table ‘erpnext.tabcolor’ doesn’t exist”)

Can somebody helped me to fix this error?

Thanks in advance

Seems you mentioned doctype name wrongly under link field options.

Thank you very much for the quick answer. Yes there was a mistake on the doctype name. Now is working just fine. :smile:

1 Like