In the article, based on the theory of micromagnetism, a special case of the moment theory of elasticity for an anisotropic material and the Hadamard compatibility condition for deformations, a microstructural model of the behavior of the Heusler alloy with shape memory in magnetic and force fields is constructed. The dynamics of the magnetic process is described by the Landau-Lifshitz-Gilbert equation. Using the Galerkin procedure, variational equations corresponding to the differential relations of the magnetic problem are written out and the finite element method is used for numerical realization of these equations. Considering the problems of the moment theory of elasticity we come to a special case of this theory in which, under the action of force and magnetic fields, the tensor of moment stresses initiated only by the magnetic field is zero. Using this result, the general expression for the state equation is constructed that describes, within the framework of small deformations, the behavior of an anisotropic material under force and magnetic influences. The stress tensor in this equation consists of a symmetric part and a skew-symmetric part, depending only on the magnetic field. For the problem of deformable solid mechanics with such a state equation, the Lagrange variational equation was constructed, which made it possible to reduce the requirements for the smoothness of the desired solution by an order of magnitude. The general expression for the state equation has been concretized for an anisotropic material having one axis of symmetry of the fourth order and two axes of symmetry of the second order. The solution of the Hadamard compatibility equation for deformations made it possible to determine the sliding surfaces and sliding directions in a tetragonal crystal cell of a ferromagnetic material in the martensitic state, along which a shift occurs, leading to the appearance and dissipation of a twinned structure. The microstructural model, constructed using all these positions, is used to describe experimental results on the combined action of magnetic and force fields on the Heusler alloy.