Python class method in js

I have a class method which is not whitelisted, and I want to call this class method in js file.
how can I call it?

Hi,

You can call server side class method in js file by using ‘get_server_fields’.
Please refer following links :
https://github.com/frappe/erpnext/blob/develop/erpnext/accounts/doctype/c_form/c_form.js#L24
https://github.com/frappe/erpnext/blob/develop/erpnext/accounts/doctype/c_form/c_form.py#L60

Regards,
Priya Shitole
New Indictrans Technology Pvt.Ltd.