here how i can hide r restrict the delete and delete all buttons.
Can you share the code ?
If you want to hide delete or delete all button
try this
frm.fields_dict[āchild_table_nameā].grid.wrapper.find(ā.grid-remove-rowsā).hide();
thanks for sharing but doesnt workā¦
in a dialog how we can restrict those things
need to bulidā¦
You can add frappe.user.has_role(āBlablablaā)
add in the function delete and delete all button
i m trying these buttonsā¦
Thanks fa sharing but not worked
Try this in your Dialog child table declaration
{
fieldname: ātrans_itemsā,
fieldtype: āTableā,
label: āItemsā,
cannot_add_rows: 1,
cannot_delete_rows : 1,
in_place_edit: false,
reqd: 1,
read_only: 1,
data: this.data,
get_data: () => {
return this.data;
},
fields: fields
},
Thanks for sharing this sammer,
We can use this for custom dialog
yes u can