Need help in fetching data using js code

Hello Guys !!

Need help in fetching data using js code.

Anybody has solution ?

Thanks.

https://frappe.io/docs/user/en/guides/basics/frappe_ajax_call

1 Like

With the current details I can ask you to do this :-

  1. Create a Python function which will get the data and return it.
  2. in your JS file, use frappe.call with relevant arguments, retrieve data if and set it in the variables as you wish.

Also, reading through the current code of your ERPNext App will help you get to know all these methods that have already been written. This will help you learn better.