Code of grid buttons like "add multiple" "delete'

Hi, which file has the code of grid buttons like “add multiple” "delete’ .
screen in question is BOM–>BOM Item(child or grid table)
image

Hi, please check frappe/public/js/frappe/form/templates/grid_body.html

Thanks @NMyshuk grid_body.html reflects template of UI. I am looking for js code which gets called on click of “add multiple”

please check frappe/frappe/public/js/frappe/form/grid.js, I think set_multiple_add function

On click of “Add Multiple” the above dialog box opens asking for “select Item” , so from which file this code comes

please check frappe/frappe/public/js/frappe/form/grid.js, I think set_multiple_add function

say alongwith “Add Multiple” , i want to add my own custom button and in Add multiple popup i want to do more customization…so question is where is the code of this. Thanks

did you find where to write the code for that dialog box?

1 Like

Hello Sir,
I am very new to Erpnext. i want to implement same add_multiple functionality which you can see in training event doc-type for employee selection. So can you tell me how to do this thing and what is the procedure for implementing this in new doc-type and file needs to be change.
Thanks in advance.

You can add in your doctype JS following code to activate ‘Add multiple’ button for child table

	onload_post_render: function(frm) {
		frm.get_field("items").grid.set_multiple_add("item_code", "qty");
	},

ex

1 Like