Heun-type solutions for Schwarzschild metric with electromagnetic fields