Is it possible to set docname in a field after saving

Hi,
I need to get document name in work order and set it in a custom field called document id.
Is it possible to do so , kindly help on this.

Thanks,

Its working by below script,
frappe.ui.form.on(‘Work Order’, {
validate: function(frm) {
frm.set_value(“document_id”,frm.doc.name);
}
});

@Revathi_Gurumoorthy