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).
This is yet another example of why this season's been so bad. Instead of writing a final season on the basis of telling a good story, the writers keep having to work around the cast members other projects (Helms filming "the Hangover Part 3," Krasinski contracting for less than a full season, Wilson's potential spinoff).