EXCLUSIVE: A year ago, film and TV  writer Adam F. Goldberg landed his first broadcast pilot order with the Fox comedy Breaking In. It didn’t make the cut in May but, in a rare case of a pilot coming back from the dead, it received a seven-episode midseason order by the network six months later. To top it off, the single-camera comedy  starring Christian Slater landed a killer time slot, following American Idol‘s performance show on Wednesday. Now, Goldberg is wrapping a breakthrough year in TV with his first overall deal, a two-year pact at Sony Pictures TV, which produces Breaking In with studio-based Happy Madison.

Goldberg started off in TV as writer of Syfy’s 2001 comedy pilot Area 52 and as writer-producer on CBS’ multicamera sitcom Still Standing. He segued into movies, writing Fanboys and also working on the DreamWorks animated comedies Monsters vs. Aliens and How to Train Your Dragon. But he kept his toe in the TV waters through Happy Madison where he wrote four consecutive comedy pilot scripts for the past 4 years. The fourth, Breaking In, went to pilot, which he co-created with director Seth Gordon. After encouraging early buzz – Breaking In was reportedly Fox’s highest-testing pilot last season – the network passed on the project, a workplace comedy set at a digital security firm, in favor of Greg Gracia’s Raising Hope, Mitch Hurwitz and Will Arnett’s Running Wilde and Traffic Light. Goldberg says he understood the network’s initial trepidation. “Breaking In is a very different office comedy and a caper comedy,” he said. “Aside from Chuck, there is no half-hour comedy that does stuff like that.”

But Sony didn’t give up on the pilot and extended the options on the entire cast when they expired after the upfronts. Fox then ordered 2 additional scripts, which Goldberg wrote. With Running Wilde‘s disappointing ratings performance a factor, Breaking In got a midseason order in November. Staffing the show was a challenge as the pool of available writers that time of year is pretty small, so Goldberg relied mostly on friends he had worked with before. And Gordon had to pull away from  his directing duties on the feature comedy Horrible Bosses to helm several more episodes for the series. But in the end, WME-repped Goldberg thinks the six-month gap between making the pilot and getting the series pickup was helpful. “It was nice to have that distance, to go back with fresh eyes and say: this is what we like about the pilot.”