Submit Via custom script

I want to trigger submit on click of a custom button.
My document is already saved as I am uploading a file, so need to submit the document on click of that custom button

@nikzz were you able to solve this?