Attach Documents to RFQ from Item Master

Hello All,
I want to fetch attachments from Item master to RFQ, came across this Custom Script Community Developed Custom Scripts · frappe/erpnext Wiki · GitHub

It is not working for me. Has anyone used it? Would like to know how to use it

What is the problem you are getting when you use it?

i am have same issue. i wanted to attach file from item into quotation . using following script

refresh: function(frm) {
frm.add_custom_button(__("Load Attachments"), function(foo) {{
	args: {
		document: cur_frm.doc,
	callback: function(r) { 



it is giving me error as bellow after clicking on button


This expects you to have your own app and it’s controller. Do you have that in place? It needs custom app and a python file within to be existing.

You need to press F12 in chrome to see the exact error on the right.

Yup, I realised, need to have a custom app in place before running the Client-side Custom Script

thank you
is it working for you?
can you please explain in steps and why the custom app needed for this?

I have not implemented this yet.
But the reason a custom app is required is, we need to define the method mentioned here in the custom script

The JS Custom Script on its own is no good because the method needs to be defined on Server Side.

Will comeback with detailed steps, once we implement this

thank you
i am also trying to solve it. i will be trying it on server side in custom app.
please keep everyone posted. so that we can achieve this