Call do_key('create_record');
in your when-button-pressed trigger. This will insert a new record in the current block with all, what state changes accordingly.
Changing the state with set_record_property(:system.cursor_record, :system.cursor_block, state, 'INSERT');
will not bring the exact same result. But give it a try!