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

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

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 (python - Find oldest/youngest datetime object in a list - Stack Overflow)
or with frappe filters like this one:
Frappe Api issue in filtering between two dates - #2 by aldoblack

Hi can you please post an example cur_frm.doc.creation method in client script.

Trying to fetch last created in my doctype sort by specific date field from my custom doctype.

Really appreciate for the help.

Thanks