ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

How to get latest entry created in doctype..in custom script


#1

I want to get a particular field’s value of the latest doctype created. (Doctype with highest/latest naming series ). Any suggestions ??


#2

Well, you can retrieve a doctype modification date with: cur_frm.doc.creation
Then, you can filter the result to only get the latest date with python (https://stackoverflow.com/a/3922675/8291000)
or with frappe filters like this one:
Frappe Api issue in filtering between two dates