Solving an electrostatics-like problem with a current dipole source by means of the duality method