<P> Just as Pam is telling the cameras that she does not think that it would work out between her and Jim, he bursts into the room and asks her out to dinner . Stunned, she agrees, and Jim says, "Alright . Then, it's a date ." After Jim exits the room, Pam becomes visibly joyous and forgets what she was talking about . </P> <P> During a phone call, David Wallace offers the job to Ryan Howard (B.J. Novak), who accepts and immediately breaks up with Kelly Kapoor (Mindy Kaling). </P> <P> "The Job" was written by Paul Lieberstein and Michael Schur . It was directed by Ken Kwapis, who had, around the same time, directed The Office actor John Krasinski in the 2007 film License to Wed . Script reading for the episode took place on a beach during the filming of the season's twenty - third episode, "Beach Games". Actress Kate Flannery remarked that "we were so excited that we almost had another hot dog eating contest . Not . It's a great script . Lots of questions answered . Lots . The Office fans have been anxiously awaiting a one - hour episode, and guess what? You got it ." The original cut of the episode was an hour and twelve minutes long, and had to be edited down to forty - two minutes of screentime . It was the second Office episode to fill the entire hour timeslot; the first was the third - season episode "A Benihana Christmas". </P> <P> Krasinski received a haircut due to production on another film, Leatherheads (2008), which he thought "ended up working perfectly" for the season finale . Co-creator Greg Daniels had wanted Jim to get a haircut for a while, as he thought it would "change (him) up a little bit ." Krasinski thought it was "really smart" to make it seem like Karen's idea . Kwapis was careful with Jim's reaction shots in the episode, as he did not want to "tip anything" to the audience about Jim's choice of Karen or Pam . Kwapis explained, "That to me was actually one of the big challenges of the episode is how to keep you on your toes in terms of not knowing where the story was going ." Jim's flashback scene with Pam on the beach was initially intended to be the cold open of the episode before Michael Schur suggested it be moved . Kwapis shot multiple endings, and the cast was unaware how the season would end . </P>

Who did jim ask out on the phone