Jenisha
December 28, 2019, 7:56am
#1
Hi,
In sales order , I have a button for creating Allotment which is a custom doctype. Using frappe.set_route I am able to get parent table values but not sure how to get child table values along with it. Kindly help, thanks!
frappe.ui.form.on(“Sales Order”, “refresh”, function(frm) {
frm.add_custom_button(__(“Make Allotment”), function() {
frappe.route_options = {
“customer”:cur_frm.doc.customer,
“sales_order”:cur_frm.doc.name,
“delivery_date”:cur_frm.doc.delivery_date,
“set_warehouse”:cur_frm.doc.set_warehouse
};
frappe.set_route(“Form”, “Allotment”, “New Allotment”);
}, __(“Make Allotment”));
});
lokesh
January 7, 2020, 12:21pm
#2
Hi Go to below link. Hope this will help you.
Hi Mates,
I’m trying route a new doctype [Import Permission Received Items] with route_options from a child-table raw with a field value of the child table [Import Permission Item] and name of parent doctype [Import permission] .
here i’m getting the value of parent doctype ie. [Import permission] with code frm.doc.name and also need to get the value of the item_name field from the child table but that’s failed.
Here is the code my trying…
frappe.route_options = {“permission_number”: frm.do…