Hi All,
I need to hide settings icon from chid doctype,user dont want to hide or remove the fields in table.
Can you Please help me out.
Hi All,
I need to hide settings icon from chid doctype,user dont want to hide or remove the fields in table.
frappe.ui.form.on("Doctype Name", {
// you can also use onload event here
refresh(frm) {
$('use[href="#icon-setting-gear"]').parent().hide()
},
});
Try This
frappe.ui.form.on('Partner Books', {
refresh: function(frm) {
const grid = frm.fields_dict.transaction_history.grid;
grid.wrapper.find('.grid-row').css('pointer-events', 'none');
grid.wrapper.find('.btn-open-row').hide();
const disableGear = () => grid.wrapper.find('use[href="#icon-setting-gear"]').closest('a').hide().off('click');
grid.wrapper.find('.col.grid-static-col.d-flex.justify-content-center').css({'pointer-events': 'none', 'cursor': 'default'}).off('click');
setTimeout(disableGear, 0);
}
});
Replace Partner Books with your doctype name and transaction_history with your child field name