ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Using after_insert and sending doctypeData

customization
custom_script
erpnext

#1

I trying to call a method after_inser in the hooks.py and send as parameters the info in this doctype but i dont know how to reference my method (wich is in an another py file) neither send or acces the date in my doctype. I read the documention for this and even saw the videos from the ERPNext and i cant even start on this.

Capturar
i need to put the path to my function in here but idk how, and my method look like this:


all those parameters are data in the doctype im trying to do this “after_inser” call

SOS


#2

Hi there,
you can access all the fields of your doctype simply using only one parameter,
e.g: def generateItemOrder(doc,method):
you can access the fields using ‘doc.fieldname’.