How can I show a button, only when edit?

I have a button on my doctype, but I need to show that, only if when user is on edit mode… how can I do that?


Check this:

cur_frm.doc.__unsaved = 1 when changes in form was not saved.

cur_frm.doc.__islocal = 1 Only once creating new doc.

1 Like

Thanks! Works fine!!