Lopez, who appeared in two episodes of the NBC sitcom’s sixth season, will play herself as well as her NBC crime drama character, Det. Harlee Santos.