Can autoname field:[fieldname] update the field?

Hi ERPNext/Frappe Team!

Awesome job on the framework/erpnext.

I was wondering if there was any way to have the linked field:[fieldname] in autoname update the said field when a document’s title is changed?

At the moment say if I have:

  • a data field called my_doc_name
  • set autoname to field:my_doc_name
  • set the tile field to my_doc_name

Then I have a user create a new document.
Later said user then changes the document title. This updates the document’s name internally but leaves my_doc_name field with old outdated data and thus the title still has the old my_doc_name data. My users get confused as they see what they think the title not updating.

Maybe I missed something setting up the autoname?

By the way the reason I am using field:[fieldname] is so that when linking this documents the drop down shows a human readable title instead of the generated identifier.

Thanks for your help!

@Felipe_Orellana welcome to the forum :slight_smile:

Yeah - this seems to be a good suggestion. Can you add it to GitHub Issues?

Hi rmehya

I’ve posted this in the frappe github issues as per your request:

issue #1805

Btw, Would extending my doctype with:

before_rename(self, old, new, merge)
after_rename(self, old, new, merge)

Help me update my field? I don’t see any documentation for these methods but I see them used in erpnext doctypes.