The advent of magnetic resonance guided radiation therapy provides a promising technology for dealing with tumour motion and anatomical variations during treatment. These machines possess a variety of beam energies, geometrical configurations, and different magnetic field strengths. Although photon beams do not directly experience the influence of the magnetic field, electrons set in motion will curve and impact dose distributions. Clinical reference dosimetry protocols rely on correction factors which account for the change in detector response for different beam qualities in the absence of a magnetic field. The effect of the magnetic field poses challenges for dosimetry, as ion chambers and solid state detectors respond disproportionately to the actual change in the dose to the media in the presence of the magnetic field. This necessitates an adaptation of current dosimetry protocols through calculation of high precision magnetic field and beam quality correction factors which account for detector response variation. In this work, charged particle transport in magnetic fields is implemented in EGSnrc and is shown to pass the Fano cavity test at the 0.1% level. Further good agreement with experimental ion chamber measurements is shown, and important effects such as air gaps and the unknown sensitive volume of the chamber are determined to cause several percent variation in the calculated ion chamber dose. Ion chamber magnetic field correction factors are then evaluated for over thirty cylindrical ionization chamber and a select number of parallel-plate chambers. Magnetic field correction factors for the majority of cylindrical chambers are within 1% of unity, while parallel-plate chambers require correction factors on the order of several percent and, unlike cylindrical chambers, no optimal orientation is available to reduce the effect of the magnetic field. The %dd(10)x beam-quality specifier is shown to have a strong dependence of the magnetic field strength, and the TPR(20,10) is determined to the optimal beam-quality specifier in magnetic fields. Collectively, this work contributes to the EGSnrc gold standard Monte Carlo code and to the evolving field of clinical reference dosimetry in magnetic fields.