Hi! In customizing doctypes, how do you make a field mandatory only before submit? Field should not be mandatory on save, only on submit. Is there a script I can type here in Mandatory Depends On (JS)?
doc.status == 1
?
I’ll try this
Is this viable as well: eval:doc.status == “Submitted”?
I think you can only achieve it via before_submit in a client script,
‘’’
if (!from.doc.field){frappe.throw(“Field is mandatory”)}
‘’’
Setting mandatory depends on for docstatus !=1 will make the field mandatory on save.
The last one worked!