Board & Card Games Stack Exchange is a question and answer site for people who like playing board games, designing board games or modifying the rules of existing board games. It only takes a minute to sign up.
Undying is a triggered ability, not a replacement effect. That means Undying creatures still "die" -- meaning that the card is placed into the graveyard from the battlefield. Then its Undying ability goes on the stack. You can activate Thraben Heretic in response to exile the creature card from the graveyard. The Undying ability do nothing when in resolves because the card it's supposed to fetch back to the battlefield is no longer in the graveyard.