the best way to set session values is to use the
p_web.SetSessionValue method.
I suspect you knew that though, and are asking some other question, but I'm not sure what it is, so perhaps you want to re-phrase...?
Incidentally, if you have in-row buttons (change / delete) then there's no such thing as the "currently selected record" - you are just editing the row which has been "assigned" to that button.
If you need more values then ideally you should load them as necessary when in the form. (PreUpdate routine)
cheers
Bruce