in ‘issue’ doctype i have one table field which is link to ‘person in charge’ doctype and in the ‘person in charge’ docrtype there is one field ‘technician’ which is link to employee now i want in the issue doctype in this table field show only those employee whose designation equal to ‘technician’
i have try script but not work
please help
frappe.ui.form.on(‘Issue’, {
onload: function (frm) {
// Apply filter to ‘custom_person_in_charge_technician’ field
frm.fields_dict[‘custom_person_in_charge_technician’].grid.get_field(‘technician’).get_query = function () {
return {
filters: {
designation: ‘Technician’
}
};
};
}
});