Document to be posted directly in a Submitted Form

Is there any option where let’s say Sales Order or Sales Invoice gets directly submitted instead of getting into Draft.? If any Client Script is applicable, please let me know?

You can write server script on insert event of document you can submit it

Hi @jitendra,

Please apply the client script for that.

frappe.ui.form.on("Sales Order", {
    after_save: function (frm) {
        if (frm.doc.docstatus === 0) {

When click on Save Button then automatically trigger and Submit the DocType.

I hope this helps.

Thank You!

1 Like

@Jigar_Tarpara , Thanks for your reply by taking your valuable Time. I will surely check and will update you

@NCP, “You’re always so supportive, and I’m truly grateful for your reply.”