frappe.db.get_list return only 20 records but i want all records.
i getting only 20 records as per list.
how to get all records?
Your answer is in the docs.
https://frappeframework.com/docs/v13/user/en/api/database#frappedbget_list
@Rehan_Ansari You can use frappe.db.get_all() for fetching all records from database
page lenght is not working ??
it print only max 20 recordsā¦not more than that.
getting error can you send the code if you have?
frappe.ui.form.on(āTransporter Itemsā, {
supplier:function(frm, cdt, cdn){
var d = locals[cdt][cdn];
frappe.db.get_list(āPurchase Orderā,
filters={
āsupplierā: ād.supplierā
},
fields=[ānameā],
start=10,
page_length=20,
as_list=True
).then(records => {
console.log(records);
})
}
})
I didnāt know you were using JS.
Try this:
frappe.db.get_list('Purchase Order', {
filters: {
supplier: d.supplier,
},
fields: ['name'],
limit: 500,
}).then(res => {
console.log(res)
});
@Rehan_Ansari
If you are doing with frappe.db.get_list you can use in JS as well as python but if you are using frappe.db.get_all() you can use this in Python code only.
frappe.db.get_list(āSupplierā,page_length=30)
okay will try in python
currently i am using in JS
thank you so much by adding limit i get all the records.
it works.
thanks again.


