Also, last I tried this all worked for me (but I've not re-tested in recent versions). Only reason I can think of why request.$context.getPrimaryModelName() wouldn't work is if possibly was called in crt.HandleViewModelInitRequest?
I tried to reload the data in the page using LoadDataRequest after button Click, But after reload it won't open the same record, but first record in the List Page.