Customize Form - Autofill the current logged in user

I’d like to add a custom field ‘Contact Person’ to the Material Request form & have it auto filled. The auto filled value will be the creator of the MR (the current logged in user). I’m unable to figure out how to fetch the current logged in user.

What can I add in the ‘Fetch from’ field so that this field can be filled?

Enter User as the default value. It will automatically add logged in user.

1 Like

Your suggestion worked. Thanks @mohitchechani!

However I see the following popup error too. It seems like there is something fundamentally wrong with my customize form setting for this field?

Try it from different User.

Or set email id in Administrator Account, as by default there is no email id in Admin account.

Same issue with another user account with email.

Try to see manually, whether the contact person list is coming or not.

Also check console log for issues.

Also check for Field called ‘Contact’, as the error is for that field not for field ‘Contact person’

use frappe.session.user in the ‘Fetch From’ field and the field type should be Read Only not Link.