I’m working on a custom script in Frappe where I need to create a new document and then add entries to its child table using JavaScript. I’m using frappe.new_doc() to create the parent document, but I’m unsure how to proceed with adding child table entries programmatically.
@NCP Is there any way to set default values for all fields? For instance, if I add an item_code in the item table, is there a method to automatically set default values for all fields in the document, similar to triggering an event?
@NCP I tested it with a setTimeout of 1 second, and it worked. So my guess is that if I run this after the document is ready, it will work fine. Before that, it doesn’t work. Is there any way to determine if the document is ready