Where can I find custom script syntax?

I have seen topics here where custom scripts are discussed and code fragments such as


are used, but I can’t find any list of the objects or events supported by ERPNext. Can someone point me at the documentation for the scripts as I can’t find it anywhere?

In particular I’m looking to trigger a script when a new operation is created so that I can automatically fill in one of the fields, but that is just the current requirement - I’d rather be independent and just look up what I need.



@mark1 sorry we are working on documentation all the time.

You have to bind an event on [fieldname]_add

frappe.ui.form.on("BOM Operation", "operations_add", function(frm, child_doctype, child_name) { 


Thanks for the specific information, It would be great to see these scraps of information in this forum collected together somewhere on the WIKI - at least then they would all be in one place and could build into something useful in time.