How to use frappe.utils methods in server script

How to use frappe.utils methods in server script

Here https://docs.erpnext.com/docs/user/manual/en/customize-erpnext/server-script are instructions for server script

I tried to write for example frappe.utils.nowdate() and frappe.utils.data.nowdate() ,but I get error

Is there any another syntax to write a frappe.utils methods

Thanks in advance

share what you have done so far

Try this
frappe.datetime.now_datetime() , frappe.datetime.get_today()

frappe.utils.nowdate() should work. Can you please share the error?

@nabinhait
TypeError: ‘NoneType’ object is not callable


submitted_on is a custom field.

Hello @alkuhlani,

I am facing this same problem, have you found any solution?

Regards,
Vishakha Mishra

1 Like

No :cry:

1 Like

I think now it is working.

How?
I can’t use frappe.utils.xlsxutils.read_xlsx_file_from_attached_file()

@indrawow Due to security issues, only selected methods are available in the server script.

https://docs.erpnext.com/docs/v13/user/manual/en/customize-erpnext/server-script#25-security