How to hide button field when select the value in service field

i want to hide chage due date field when select the value in service .

Hi, look at below script.

frappe.ui.form.on('Child Table DocType', {
	service: function(frm, cdt, cdn) {
		var d = locals[cdt][cdn];
		if (d.service) {
			frm.toggle_display("your_button_name", false);
		}
	}
});

Set your child’s doctype name and field name in the script.

2 Likes