How to Search Customer Mobile Number in ERPNext V14


I would like to search customer by their contact number saved as Primary Mobile. I cannot do that in top filter of Customer section. I also cannot search customer by mobile number when I create Sales side Document. E.g Quotation, Delivery Note, Sales Invoice.

Customize customer doctype. Edit the field Mobile No and enable ‘In Global Search’

They are already enabled in Customer and in Contact form both.

The above method works only when you add the primary contact to the customer.

in the customization you should now have mobile_no included in search fields

Now you can search a customer in Sales Order with mobile number.

When I try to click on the box “Customer Primary Contact”, I am getting below error

I have version 14.10.1

I tried to create a new customer and I get same error when clicking on Customer Primary Contact.

This is a standard feature and it should work.
Looks like you are trying to fetch or refer to field full name from contact. The error says field ‘Full Name’ is not there in contacts. Check your customizations once again both in contacts and in customer. Remove any references to Full Name. Worst case, try resetting your customizations both in contacts and customer.

I “reset to defaults” Customer and Contact Customize Form but still I get this error.

Could you please refer to this post. Also check browser console for any errors.

Console show this error

request.js:462 Traceback (most recent call last):
File “apps/frappe/frappe/”, line 69, in application
response = frappe.api.handle()
File “apps/frappe/frappe/”, line 54, in handle
return frappe.handler.handle()
File “apps/frappe/frappe/”, line 45, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/”, line 83, in execute_cmd
return, **frappe.form_dict)
File “apps/frappe/frappe/”, line 1590, in call
return fn(*args, **newargs)
File “apps/frappe/frappe/desk/”, line 62, in search_link
File “apps/frappe/frappe/desk/”, line 125, in search_widget
raise e
File “apps/frappe/frappe/desk/”, line 110, in search_widget
frappe.response[“values”] =
File “apps/frappe/frappe/”, line 1590, in call
return fn(*args, **newargs)
File “apps/frappe/frappe/desk/”, line 326, in wrapper
return fn(**kwargs)
File “apps/erpnext/erpnext/selling/doctype/customer/”, line 745, in get_customer_primary_contact
File “apps/frappe/frappe/query_builder/”, line 76, in execute_query
return frappe.db.sql(query, params, *args, **kwargs) # nosemgrep
File “apps/frappe/frappe/database/”, line 218, in sql
self._cursor.execute(query, values)
File “env/lib/python3.10/site-packages/pymysql/”, line 148, in execute
result = self._query(query)
File “env/lib/python3.10/site-packages/pymysql/”, line 310, in _query
File “env/lib/python3.10/site-packages/pymysql/”, line 548, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “env/lib/python3.10/site-packages/pymysql/”, line 775, in _read_query_result
File “env/lib/python3.10/site-packages/pymysql/”, line 1156, in read
first_packet = self.connection._read_packet()
File “env/lib/python3.10/site-packages/pymysql/”, line 725, in _read_packet
File “env/lib/python3.10/site-packages/pymysql/”, line 221, in raise_for_error
File “env/lib/python3.10/site-packages/pymysql/”, line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1054, “Unknown column ‘tabContact.full_name’ in ‘field list’”)

in Customer - Customize Form.

This is the section which pop the error. The filed customer primary contact does not have any data to fetch from.

Can you also share the JS console log. You can inspect the browser and take the console logs. Something like below

Do you have custom script enabled for customer?
Can you also check doctype customer and all list all the custom fields?

These custom fields are appearing in Customer Doctype

The only one I have created is Customer-customer_name_in_arabic

Here are the console errors

My custom script list is empty

Is this error happening for all customers or only selected customers?
Is the contact doctype working fine without errors if accessed separately?
Looks like your recent customizations we not reverted properly.
Did you enable developer mode by any chance?

In Standard Contacts Doctype Full name is not a field. I am not sure without doing customizations how the field Full name is getting referred.

I am clueless. Maybe somebody in the forum can help

@gsarunk thanks for your all this help

it happens with all the customers and contact doctype working fine. I can create a contact from the customer or directly from the contact.

Sorry i missed to observe this before. Can you share the screen shot of the details of this custom field Customer-customer_name_in_arabic.
Especially the Fetch From Section.

the Fetch from Section is empty in Customer

It definitely needs an investigation into your system.
If you are ok to restore back the customizations, just do a reset to defaults in the customizations of Customer and Contacts and try your Luck :slight_smile: