Two different edit screens

Hello everybody.

In a browse screen, when I click edit button I need to choose from two different edit screens, based on a column indicating the record type.
I’ve undestand the use of setWindowId, but I don’t know if is the right way to do this, because I need to replace it on every record change.
Which is the best solution?
Have you an example?
Thank you very much

I solved it with openEditor().
Thanks anyway