The properties of systems with Bose-Einstein condensate in external time-independent random potentials are investigated in the frame of a self-consistent stochastic meanfield approximation. General considerations are presented, which are valid for finite temperatures, arbitrary strengths of the interaction potential, and for arbitrarily strong disorder potentials. The special case of a spatially uncorrelated random field is then treated in more detail. It is shown that the system consists of three components, condensed particles, uncondensed particles and a glassy density fraction, but that the pure Bose glass phase with only a glassy density does not appear. The theory predicts a first-order phase transition for increasing disorder parameter, where the condensate fraction and the superfluid fraction simultaneously jump to zero. The influence of disorder on the ground-state energy, the stability conditions, the compressibility, the structure factor, and the sound velocity are analyzed. The uniform ideal condensed gas is shown to be always stochastically unstable, in the sense that an infinitesimally weak disorder destroys the Bose-Einstein condensate, returning the system to the normal state. But the uniform Bose-condensed system with finite repulsive interactions becomes stochastically stable and exists in a finite interval of the disorder parameter.