I’m trying to change the naming rule on the User doctype.
I want to name User docs with a random value. To achieve that, I changed these fields (see the image below) on the User doctype.
After that, when I create a user. The name property still picks up the email (which is the default behavior). I want it to pick a random hash value.
For example:
Default behavior:
{
"name": "ayan@example.com",
"first_name": "Ayan",
"username": "ayan",
"email": "ayan@example.com"
}
The behavior I want:
{
"name": "b7bd08abcd",
"first_name": "Ayan",
"username": "ayan",
"email": "ayan@example.com"
}
Btw, I can achieve this with other doctypes, facing this issue only with the User doctype.
For example:
Let me know if I’m doing something wrong, I’m new to Frappe.