Can a script keep context when switching and reverting record in different table
I'm in table A. I have a portal (table B) on this layout, but I do not want to be able to edit the fields in the portal (I just want to be able to add new records to it). So, I've created a button on "layout A" to add a related record in the layout for table B. My script takes _pkID from table A, and does a new record request in Layout B, where the user needs to choose a field. Since the new record is now created, it's essentially a "blank" record (yes, it has my pkid, but not much else). If the user clicks a button to cancel the addition, I need to revert the record (removing the "blank" record). That all works fine, but now the user is on a different record in table B, not the user from whence I came (from table A). I'm wondering how to "keep track" of the user, so when I want to go back to that user on layout A, I can. I don't want to do a find, because then I'm in table A in a "found set". The original user may not even have any related records in table B, so I can't just do a find on the original user and then GTRR in table A. I don't have much experience with using script parameters, but that seems like it could be a way to store the ID of the user and use it in some way. There are some other scenarios on layout B which I have to recover from also, but the main thing seems when I handle them, I no longer have the context of the original user, to get back to Layout A for that user.
Hope that makes sense.