Judgment unanimously affirmed, with costs. Memorandum: This proceeding seeks a determination of whether the actions of respondent Sheriff were arbitrary and capricious. The trial court reviewed the record of the hearing and reversed respondents’ decision, ordering petitioner reinstated. Since the Sheriff’s hearing was pursuant to the collective bargaining agreement and not a hearing "pursuant to direction by law” (CPLR 7803, subd 4), the trial court was not obliged to transfer the petition to the Appellate Division, but itself correctly determined the issues. (Appeal from judgment of Erie Supreme Court in article 78 proceeding to annul suspension and demotion.) Present—Cardamone, J. P., Simons, Mahoney, Goldman and Witmer, JJ.