We present an extensive numerical study of the behaviour of a filament made of ferromagnetic colloidal particles subjected to the simultaneous action of a fluid flow and a stationary external magnetic field perpendicular to the flow lines. We found that in the presence of a shear flow, the tumbling motion observed at zero field is strongly inhibited when the external magnetic field is applied. The field is able to stabilise the filament with a well defined degree of alignment that depends on the balance between hydrodynamic and magnetic torques. In addition, for a Poiseuille flow, it has been found that the initial position has a long lasting influence on the behaviour of the magnetic filament when the external field is applied.