Make custom button in submitted doctype

Hello there,

I have a custom button in a doctype, which is visible in the Draft mode, but not when it’s submitted. I want to have it visible, even when the document is submitted.

Unfortunately its hidden, even when I try code like this:

cur_frm.toggle_display(“my_custom_button”, true);

By the way: I know cur_frm is not the latest style of writing it, but even with frm its not working. cur_frm however works in the console of Google Chrome, so its better for testing directly from the console.

Solved by setting the field in doctype settings “Allow on submit”