A promise to act on someone’s behalf or for their benefit, especially one made by a party in the course of legal proceedings. An undertaking can be understood as a representation of action or intent to act in a certain way.
Example 1: For a fiduciary relationship to exist at law, the fiduciary must undertake to act for the principal, i.e. voluntarily assume the duty/responsibility (Hospital Products Ltd v United States Surgical Corporation Ltd (1984) 156 CLR 42)
Example 2: There exists an implied undertaking to the Court that a lawyer shall not use documents obtained in discovery or other Court processes for a purpose unrelated to the proceedings. The punishment is contempt of court (Harman v Secretary of State for the Home Department  1 AC 280)