We provide a neccessary and sufficient condition for the existence of the solution of the Dirichlet problem for Baire-one functions on compact convex set.