I have tried using custom script. But It doesn’t work.
frm.get_field('support_usersite').grid.cannot_delete_button = true;
I have tried using custom script. But It doesn’t work.
frm.get_field('support_usersite').grid.cannot_delete_button = true;
@Prasant_Pant Try this
cur_frm.fields_dict[‘system_mapping’].grid.wrapper.find(‘.grid-remove-rows’).hide();
Hi @Prasant_Pant,
Please check the syntax.
frappe.ui.form.on('Your DocType', {
refresh: function(frm) {
frm.set_df_property('child_table_name', 'cannot_add_rows', true); // Hide add row button
frm.set_df_property('child_table_name', 'cannot_delete_rows', true); // Hide delete button
frm.set_df_property('child_table_name', 'cannot_delete_all_rows', true); // Hide delete all button
}
});
Please set your doctype name and child table name in the script according.
Please check it reference.
https://github.com/search?q=repo%3Afrappe%2Ferpnext%20cannot_add_rows&type=code
https://github.com/search?q=repo%3Afrappe%2Ferpnext+cannot_delete_rows&type=code
I hope this helps.
Thank You!