Pass child table to sales order using custom doctype

I am passing values from custom doctype to in built form sale order am passing the cutomer name and the items by route with route option , its shows in the sale order form but when i am going to save that order . Its show me a popup message

but see the screen shot

so please any one guide me .
what i am doing wrong.
Baljeet Singh


Can you share your code.


frappe.ui.form.on(“custom doctype”, “create_invoice”, function (frm, doc) {
var new_address = frappe.model.make_new_doc_and_get_name(“Sales Order”);
frappe.set_route(“Form”, “Sales Order”, new_address, { “customer”: frm.doc.customer, “items”: frm.doc.items });


like this I am passing items to sale order

Seems like you doing something wrong in code.
Refer following link and rewrite the code.

@Sangram Thanks for your advice
its work for me thanks a lot.
Baljeet Singh