Multifunctional properties related to magnetostructural transitions in ternary and quaternary Heusler alloys