Can we put a Custom Client Script inside a Custom App?


I have developed a Custom Client Script for Child Table in DocType Purchase Receipt. The Child Table DocType is Purchase Receipt Item.

Is there any way to write this script in a .JS in my Custom App instead of adding it to Custom Client Script?


Yogi Yang

@YogiYang yes . create a js file related to the parent doctype (Purchase Receipt) in your public/js folder in your app . for exemple purchase_receipt.js . then include this new file in the hooks file using this line:

 doctype_js = {"Purchase Receipt" : "public/js/purchase_receipt.js"}
1 Like

Thank you so much @bahaou