How to fetch "created by" value in new custom field "Author"

Hello Everyone,

I created a custom DocType “Release info” and added a custom field “Author”.

I would like the “Author” field to be automatically filled in with the name of the user that created the new Release info document. For example, I created a new release info, and I want the “Author” field to be automatically updated with my name.

Is it possible to do this without using the custom scripts, as I am not familiar with them?

I tried to use the fetch from option, and I found some suggestions on forum, saying that doc.owner should be used. I tried that without success

I appreciate your help!

Hi @Aleksandra_Josic,

First set your field like Author Link with User so change Options Doctype → User

Created by Or Logging user both are same so set default value like __user (2-time underscore) then check it when you create a document then logging id/Created by id show in Author field.

Hope you will understand.


1 Like

Dear NCP,

Thank you very much, the solution is working! :slight_smile:

Have a nice day,

Dear @NCP,

I apologize, I have one more question.

The solution is working great for all new release info documents I create, but there is no field and value-added for previously created documents.

Could you please advise?

Hi @Aleksandra_Josic,

For that case, you can manually insert the author in a field.
Otherwise, if its doctype is master then export it after updating an author field then import them.


Bulk Edit: Going to doctype list for bulk edit, the first filter set created by then created by document select after go to action button and click edit button after select author name and created user id select and check it.

Have a good day,
Thank You!

Thank you very much @NCP!