Actor Craig Robinson, who was arrested June 29 in Culver City, California, and charged with three felony drug counts, has entered a tentative guilty plea for possession of ecstasy, according to TMZ.com. The other charges against the "Office" and "Pineapple Express" star, including possession of methamphetamine and being under the influence of cocaine, amphetamines and cannabinoids, have been dropped outright.

As part of his agreement with prosecutors, Robinson must enter a drug-counseling program within the next 18 months. If he successfully completes the program in that time frame, the felony conviction will be dismissed and will not appear on his criminal record.

"Mr. Robinson really appreciates and takes seriously the opportunity which has been given to him by the court and the prosecution to have all of the charges against him dismissed, upon successful completion of a counseling program," Robinson's lawyer Blair Berk told TMZ.

Robinson was originally pulled over for a routine traffic stop when police found the narcotics. The actor was already on probation for the crime of driving under the influence in a separate incident in 2006. TMZ speculates that because Robinson had already completed the terms of that probation, prosecutors in the earlier case won't seek to punish him further.

Robinson, who can currently be seen as a drug runner's villainous henchman in the stoner comedy "Pineapple Express," starring Seth Rogen and James Franco, is probably best known for his scene-stealing performance as warehouse worker Darryl on "The Office."

Robinson's next big role is in "Zack and Miri Make a Porno," also starring Rogen. Filming for the Kevin Smith-directed comedy was completed earlier this year.