A Green's function method is developed to calculate the electronic and magnetic properties of random alloys containing heavy elements. Based on the local spin density approximation, the all-electron spin-polarized version of the fully relativistic linear muffin-tin-orbital method in the tight-binding representation is used to describe disorder within the coherent potential approximation. The method is first tested on ferromagnetic 3d metals ͑Fe, Co, Ni͒ and then applied to study the electronic and magnetic properties of the fcc alloy systems