Autoname Customer through custom field

I am trying to auto name customers through the custom app hook. But it is not working.

Has anyone worked on auto naming the customer based upon the custom field?

I want to name the customer based upon the field such as mobile_no/email.

Any suggestions, please.

Regards,
Koshish Koirala

Hi,
Set proper path in hooks.py

In my Task Doctype i have two fields, email (link to users) and feild with Data type.
When I select an email in field “moderator_email”, I can get (Fetch Form) information about the fields of this user. (picture)