Get current docname from server side script

Hello ,
Is there any method for getting current docname from the server side script (Api type).
or Any method in get_value (‘doctype’,‘docname’,‘fieldname’)… in the place of docname we have to give static docname … Is there any method to get current docname in server side script dynamically from the api’s end .
regards sakshi

Hi,

See if something from here can help: https://github.com/frappe/frappe/wiki/Developer-Cheatsheet

Hi Sakshi,

As in standard doctype features, doc.doctype will return doctype name and doc.name will return document name.

hello sherinKR,
thank you for the response
but doc. only works in document type but not in API type in server script…

Thank you …
I’ll try on it