When a person dies all his deeds come to an end except 3...
1. Sadaqah jariah
2. Beneficient knowledge
3. A righteous child who will pray (for parents)
(Hadith Sunan Tirmidhi, 1326)
The Prophet (peace and blessings of Allah be upon him) said: "When a person dies, all his deeds come to an end except three: sadaqah jaariyah (ongoing charity, e.g. a waqf or endowment), beneficial knowledge (which he has left behind), or a righteous child who will pray for him."
(Reported by al-Tirmidhi, no. 1376; he said this is a saheeh hasan hadith)