According to the Mahayana, perfection of the two accumulations (merit and wisdom) is a prerequisite to attaining full enlightenment. Alone, merit does not lead to liberation, but only to higher states within samsara.

However, by dedicating the meritorious act to the liberation of all sentient beings, the character of the seed is transformed. If one plants an apple seed, an apple tree will grow. Likewise, seeds dedicated to liberation will lead to liberation.

Prior to performing any positive act, one should thus affirm one’s motivation: May all benefits from this act help sentient beings attain complete enlightenment.’

In addition, while engaged in the activity, one should reflect that the giver, recipient and object given are empty of inherent existence. This protects the merit. (There are four ways that positive karma can be destroyed: through failing to dedicate the merit in favour of others’ enlightenment, anger, regretting having performed the beneficial deed and boasting of one’s positive action.)

Finally, the activity should be ‘sealed’ by dedicating the merit towards the enlightenment of all beings. In the same way that a drop of water is preserved by adding it to the ocean, dedicating one’s merit to the ‘great ocean’ of beings sustains its power until the fruit of complete Buddhahood is attained.

The Middle Perfection of Wisdom Sutra (The Middle Prajnaparamita Sutra) explains this in the following way (paraphrased): O Sabhuti! When one develops the excellent mind of enlightenment, even the ten virtuous deeds and so forth will become liberative virtues.”

The Ulambana Sutra ”If one can offer Food, Amenities and Medicine to the Maha Sangha of the Ten Directions, through the merits of such offer and their pristine cultivation, the donor and their parents of past seven lives, relations and kins may be free from the three lower (evil) realms. One’s parents and oneself will be blessed with long life with food, and be free of sickness or worry.

“With this merit, May we adorn the Buddha’s Pureland,
Repaying the four immense Kindness above, and aid the suffering of the three (lower) paths.
May those who hear of this, evoke the aspiration to attain Buddhahood,
And with the passing of this life, be reborn in the Land of Ultimate Bliss (Pureland)”

 
Releasing Life: An Ancient Buddhist Practice in the Modern World Shenphen Zangpo p15