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.

Koshish Koirala

Set proper path in

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)