Electric and Magnetic Field-Assisted Orientational Transitions in the Ensembles of Domains in a Nematic Liquid Crystal on the Polymer Surface