I have 2 doctypes, When i press button i want to send fields data
, and items
to another doctype, during research i found sample like this. But doesn’t working at all. Any suggestion?
frappe.ui.form.on('Testdatafrom', {
custom_button: function (frm, cdt, cdn) {
msgprint(frm.doc.custom_label);
frappe.set_route("Form", "Testdatato", "New Testdatato 1", { "name": frm.doc.custom_label});
}
});
And show custom_label
in here like this
frappe.ui.form.on('Testdatato', {
onload(frm) {
frm.set_value('custom_label', name);
}
});