Custom link to custom doctype

Hi,

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/app.py”, line 67, in application
response = frappe.handler.handle()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py”, line 74, in handle
execute_cmd(cmd)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py”, line 99, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 758, in call
return fn(*args, **newargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/desk/search.py”, 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/search.py”, line 88, in search_widget
as_list=True)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/desk/reportview.py”, line 17, in execute
return DatabaseQuery(doctype).execute(*args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 50, in execute
return self.build_and_run()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 53, in build_and_run
args = self.prepare_args()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 67, in prepare_args
self.remove_user_tags()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 160, in remove_user_tags
columns = frappe.db.get_table_columns(self.doctype)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”, 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/database.py”, line 146, in sql
self._cursor.execute(query)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, 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