Try ERPNext Buy Support Partners Foundation

How to get permanent all employees from js file in erpnext, frappe

How can i get employees from employee document list by filtering any fieldname. Like i want to get all employees who is permanent employee. anyone can give the function what should i use in python and js both file to get employees like this way.

To get a list of all Employees with Employment Type = Full-time :

frappe.get_all("Employee", filters = {"employment_type": "Full-time"})

Example usage:

#simple dict filter
frappe.get_all("ToDo", fields=["name", "description"], filters = {"owner":"test@example.com"})

# filter as a list of lists
frappe.get_all("ToDo", fields=["*"], filters = [["modified", ">", "2014-01-01"]])

# filter as a list of dicts
frappe.get_all("ToDo", fields=["*"], filters = {"description": ("like", "test%")})

Thank you so much brother. how to get employees from JS file too?

Refer: