Change Customer Primary Key to a custom new field

How to change the customer primary key to a custom new field? When I set index = true to that new field I dont see the change reflected when I “desc tabCustomer”. The name field is still the primary key despite me setting index to false. It appears index is not related to the primary key setup.

What is the way to change which field ERPNext uses as the primary key?

index = true just creates an index on the column in the database

Go to “Customize Form”, select customer, and change “Title Field” to your custom field. This can have unintended consequences through, and is most likely not recommended.