We demonstrate that for ultracold, optically trapped Cs atoms the photoassociation (PA) can be manipulated by using external uniform magnetic fields due to the alteration of the scattering wavefunction in the region of the free–bound optical transition. We present PA–induced atom loss measurements with the same intensity for PA laser but different external magnetic fields, and analyze main contributions of the PA to the variation of the number of atoms in the trap. The PA rate exhibits a strong dependence on the changing uniform magnetic field. The experimental data are simulated within the model of a single–channel one–well rectangular potential, whose depth is adjusted so as to assure the predicted variation of the scattering length with the magnetic field. The computational and experimental results are in a reasonable agreement to each other. The same model is used to illustrate some general properties of the two–body quantum system in the near–threshold state.