User Activity

Tell me, can I make a button to return to the previous window with data saving?