{6} This appeal is distinguishable from Gallegos. Gallegos involved a plea in magistrate court, and then a de novo appeal to the district court. Id. ¶ 1. In contrast, this case involves a plea in metropolitan court, and an on-the-record appeal to district court. Thus, the district court in this case does not sit in the same capacity as the district court in Gallegos. Instead, in an on-record appeal, the district court is the equivalent of an appellate court. Appellate courts do not typically hold evidentiary hearings to determine whether a plea is valid. Therefore, we conclude that if Defendant wanted to challenge the validity of his plea, the issue had to be presented in metropolitan court in the first instance. See State v. Andazola, 2003-NMCA-146, ¶ 25, 134 N.M. 710, 82 P.3d 77 (<HOLDING>). Because Defendant’s on-the-record appeal
holding that if the defendant fails to file a motion in the trial court to withdraw his plea he cannot attack it for the first time on appeal holding that a defendant who is allowed to withdraw his plea must either withdraw his plea to all charges or to none when his plea to all charges was part of an agreement with the state holding that claims which were not presented to the motion court cannot be raised for the first time on appeal holding that an issue not raised in the trial court cannot be raised for the first time on appeal holding that where a defendant fails to challenge his plea in district court he must establish plain error