The episode was actually filmed very early in the season, but held back to air until now, because they weren't sure whether "The Farm" was going to go to series or not, so they had to keep their options open with regard to what Dwight does.
If The Farm had gone to series, then Rainn Wilson would have missed a bunch of episodes this season, a la Ed Helms's extended absence, because he'd be busy filming the early batch of episodes of The Farm. Since it's *not* going to series, I assume he won't have to miss any episodes at all. They'll presumably write it so that this is the impetus for him to leave Dunder Mifflin, but for some contrived reason, his departure is gradual, and he won't actually leave for another couple of months (to coincide with the finale).