That's a good method.
Another one is to set the corpse options you want, then kill the NPC. I often use
SetIsDestroyable(FALSE, TRUE, FALSE);
which makes the NPC corpse unselectable, like a static placeable. This has the advantage that players aren't explicitly told that the NPC is dead; they can't interfere with inventory or converse. You can play around with the parameters to get the effect you need, though.
You can kill the NPC with EffectDeath or EffectDamage (the difference being that only the latter fires the OnDeath event, which you might not want in this case).
To bring the corpse to life,
RemoveEffects(oNPC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectResurrection(), oNPC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectHeal(GetMaxHitPoints(oNPC)), oNPC);
SetCommandable(TRUE, oNPC);