Call custom button method when click on button

Hello Community,
I am new in erpnext development. So, I want to know the basic stuff regarding erpnext development.

I had created one button as a type button in base doctype ‘Packing Slip’. Now I want to call my python-js function when I click on the button which I added in packing slip.

Can anyone give me a basic idea about how to write code in js/python to call my custom function when clicking on a button?

Waiting for your reply.

Thank You.


Welcome to ERPNext community.

Please check the following documentation on custom script


The above site is not getting open.

@Sunil_Govind check this link: