Insertion trigger

Hey Everyone,

I am very new to ERPNext. I am working on schools module i have to customize it and make it like everyone can apply for admissions using ERPNext application. For this i have made new sign up form using Core user doctype, the thing i need is when data inserted in user doctype on successful sign up it should also insert in Student Applicant doc type


after login i want to fetch required fields and auto fill my student applicant form using information i inserted earlier in user doctype using signup. for example first name, email, gender are common in signup and student applicant form i want to auto fill these things in student applicant form after login.

You can use after_insert from hooks.

Check - Hooks

Thanks… If you could share any examples or tutorials to use hooks…!!

Check ERPNext hooks.


@Sangram the line you shared
“User”: {
“after_insert”: “”,

should insert a contact whenever we create user… firstly it was happening whenever i creates a user but suddenly it stops… i have made new VM and installed fresh ERPNext but now it is inserting user in user but not in contacts… can you help me in this?

My main task is to insert student applicant when user sign up…!!