I did Ceday's suggestion and it works perfectly. Although the hero icon of the new unit is there, and the replaced unit doesn't get the experience the new unit gains. And I need the old unit to die if the new unit dies. How do I make it like that?
@Rheiko - I cant find a command like that, is it under the "Units"?