X-ray radiative transfer in protoplanetary disks. The role of dust and X-ray background fields