Ariz. Rev. Stat. § 13-604
B. Notwithstanding subsection A of this section and until the court actually enters an order designating an offense a misdemeanor or a felony, the offense shall be treated as a felony conviction for all of the following purposes:
D. If a crime or public offense is punishable in the discretion of the court by a sentence as a class 6 felony or a class 1 misdemeanor, the offense shall be deemed a misdemeanor if the prosecuting attorney files any of the following: