Can I get current value of a prefix from naming series for a Document?

Can I get current value of prefix from naming series for a Document?

i.e. Delivery Note -> DN- > Current_Value

Thanks
Mithilesh

@2002

From tabSeries table,
try this frappe.db.get_value(‘Series’, ‘DN-’, ‘current’)

Thanks, Rohit

Hi Rohit,
Please find below my script and it gives error “desk.min.js:7708 Uncaught ReferenceError: frm is not defined”

cur_frm.cscript.naming_series = function(doc, cdt, cdn) {
result_value = “DN-”;
result_value=frappe.db.get_value(“Naming Series”, “DN-”, “current_value”)
frappe.model.set_value(cdt, cdn, “gr_number”, result_value);
}